mstorsjo (Martin Storsjö)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 25 2016, 12:54 PM (56 w, 1 d)

Recent Activity

Yesterday

mstorsjo added inline comments to D33880: COFF: Introduce LD shim around LINK.
Tue, Aug 22, 10:16 PM

Mon, Aug 21

mstorsjo committed rL311359: Update Clang 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64.
Update Clang 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64
Mon, Aug 21, 11:46 AM
mstorsjo closed D36931: Update LLVM 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64 by committing rL311359: Update Clang 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64.
Mon, Aug 21, 11:46 AM

Sat, Aug 19

mstorsjo created D36931: Update LLVM 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64.
Sat, Aug 19, 1:38 PM
mstorsjo committed rL311260: [ARM] Factorize the calculation of WhichResult in isV*Mask. NFC..
[ARM] Factorize the calculation of WhichResult in isV*Mask. NFC.
Sat, Aug 19, 1:28 PM
mstorsjo closed D36930: [ARM] Factorize the calculation of WhichResult in isV*Mask. NFC. by committing rL311260: [ARM] Factorize the calculation of WhichResult in isV*Mask. NFC..
Sat, Aug 19, 1:28 PM
mstorsjo added inline comments to D36930: [ARM] Factorize the calculation of WhichResult in isV*Mask. NFC..
Sat, Aug 19, 1:25 PM
mstorsjo created D36930: [ARM] Factorize the calculation of WhichResult in isV*Mask. NFC..
Sat, Aug 19, 12:59 PM
mstorsjo committed rL311258: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.
[ARM] Check the right order for halves of VZIP/VUZP if both parts are used
Sat, Aug 19, 12:49 PM
mstorsjo closed D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used by committing rL311258: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.
Sat, Aug 19, 12:49 PM
mstorsjo added a comment to D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.

Do you think it may be worthwhile to extract the operation into a function?

static unsigned SelectPairHalf(unsigned Elements, ArrayRef<int> Mask, unsigned Index) {
  if (Mask.size() == Elements * 2)
    return Index / Elements;
  return Mask[Index] == 0 ? 0 : 1;
}
Sat, Aug 19, 12:05 PM
mstorsjo added a reviewer for D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used: jeroenk.
Sat, Aug 19, 3:55 AM
mstorsjo updated the diff for D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.

After digging in further, I found an even more elegant way of fixing it. And when expanding that fix to isVUZPMask and isVTRNMask, I noticed that the exact same fix as I was trying to provide already was present in isVTRNMask. So expanding that fix to all of them now, with the same code formatting style as in the existing check.

Sat, Aug 19, 3:51 AM

Fri, Aug 18

mstorsjo updated the diff for D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.

Understood the root cause better, with the hidden assumptions of isVZIPMask where both outputs are used.

Fri, Aug 18, 9:28 PM
mstorsjo created D36899: [ARM] Check the right order for halves of VZIP/VUZP if both parts are used.
Fri, Aug 18, 2:27 PM
mstorsjo added a comment to D33880: COFF: Introduce LD shim around LINK.

I'm currently testing shared library building(dll's) and adding testcases.
Will be back with an update today/tomorrow once that is ironed out.

Fri, Aug 18, 9:57 AM

Thu, Aug 17

mstorsjo added a comment to D33880: COFF: Introduce LD shim around LINK.

Ping @martell - do you have time to update this patch according to Rui's review?

Thu, Aug 17, 1:01 PM

Wed, Aug 16

mstorsjo committed rL311069: [llvm-dlltool] Improve an error message when unable to open files. NFC..
[llvm-dlltool] Improve an error message when unable to open files. NFC.
Wed, Aug 16, 11:27 PM
mstorsjo closed D36818: [llvm-dlltool] Improve an error message when unable to open files. NFC. by committing rL311069: [llvm-dlltool] Improve an error message when unable to open files. NFC..
Wed, Aug 16, 11:27 PM
mstorsjo created D36818: [llvm-dlltool] Improve an error message when unable to open files. NFC..
Wed, Aug 16, 11:06 PM
mstorsjo updated subscribers of D36780: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened.

@hans - I guess this should be backport-worthy as well?

Wed, Aug 16, 11:01 PM
mstorsjo committed rL311068: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened.
[llvm-dlltool] Don't crash if no def file is provided or it can't be opened
Wed, Aug 16, 11:00 PM
mstorsjo closed D36780: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened by committing rL311068: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened.
Wed, Aug 16, 11:00 PM
mstorsjo added inline comments to D36780: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened.
Wed, Aug 16, 11:00 PM

Tue, Aug 15

mstorsjo committed rL310992: [COFF] Don't produce weak aliases in import libraries.
[COFF] Don't produce weak aliases in import libraries
Tue, Aug 15, 10:24 PM
mstorsjo committed rL310991: [COFF] Make the weak aliases optional.
[COFF] Make the weak aliases optional
Tue, Aug 15, 10:24 PM
mstorsjo closed D36634: [lld] [COFF] Don't produce weak aliases in import libraries by committing rL310992: [COFF] Don't produce weak aliases in import libraries.
Tue, Aug 15, 10:24 PM
mstorsjo closed D36633: [COFF] Make the weak aliases optional by committing rL310991: [COFF] Make the weak aliases optional.
Tue, Aug 15, 10:23 PM
mstorsjo committed rL310990: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
[llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386
Tue, Aug 15, 10:19 PM
mstorsjo closed D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386 by committing rL310990: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
Tue, Aug 15, 10:19 PM
mstorsjo committed rL310989: [COFF] Fix the name type for stdcall functions in import libraries.
[COFF] Fix the name type for stdcall functions in import libraries
Tue, Aug 15, 10:14 PM
mstorsjo committed rL310988: [COFF] Add SymbolName as a distinct field in COFFImportFile.
[COFF] Add SymbolName as a distinct field in COFFImportFile
Tue, Aug 15, 10:14 PM
mstorsjo closed D36545: [LLD] [COFF] Fix the name type for stdcall functions in import libraries by committing rL310989: [COFF] Fix the name type for stdcall functions in import libraries.
Tue, Aug 15, 10:14 PM
mstorsjo closed D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile by committing rL310988: [COFF] Add SymbolName as a distinct field in COFFImportFile.
Tue, Aug 15, 10:14 PM
mstorsjo created D36780: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened.
Tue, Aug 15, 10:09 PM
mstorsjo added a comment to D36634: [lld] [COFF] Don't produce weak aliases in import libraries.

Just FWIW, I was about to commit this, but noticed that this test actually depends on D36545, which depends on D36544 (which is yet unapproved). So I'll need to hold off of this one until those patches are merged first.

Tue, Aug 15, 1:48 PM

Mon, Aug 14

mstorsjo committed rL310871: [COFF] Add support for aligncomm directives.
[COFF] Add support for aligncomm directives
Mon, Aug 14, 12:08 PM
mstorsjo closed D36304: [lld] [COFF] Add support for aligncomm directives by committing rL310871: [COFF] Add support for aligncomm directives.
Mon, Aug 14, 12:08 PM

Sun, Aug 13

mstorsjo committed rL310798: [AArch64] Add support for a MinGW AArch64 target.
[AArch64] Add support for a MinGW AArch64 target
Sun, Aug 13, 12:43 PM
mstorsjo closed D36364: [AArch64] Add support for a MinGW AArch64 target by committing rL310798: [AArch64] Add support for a MinGW AArch64 target.
Sun, Aug 13, 12:43 PM
mstorsjo committed rL310797: [COFF, ARM64] Use '//' as comment character in assembly files in GNU….
[COFF, ARM64] Use '//' as comment character in assembly files in GNU…
Sun, Aug 13, 12:43 PM
mstorsjo closed D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments by committing rL310797: [COFF, ARM64] Use '//' as comment character in assembly files in GNU….
Sun, Aug 13, 12:43 PM

Sat, Aug 12

mstorsjo added a comment to D36364: [AArch64] Add support for a MinGW AArch64 target.

@compnerd - are you ok with this one as well?

Sat, Aug 12, 11:00 PM
mstorsjo updated the diff for D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

Updated to set the right name type for C++ symbols as well, including a testcase for it.

Sat, Aug 12, 1:06 PM

Fri, Aug 11

mstorsjo created D36634: [lld] [COFF] Don't produce weak aliases in import libraries.
Fri, Aug 11, 1:01 PM
mstorsjo created D36633: [COFF] Make the weak aliases optional.
Fri, Aug 11, 1:00 PM
mstorsjo added inline comments to D36304: [lld] [COFF] Add support for aligncomm directives.
Fri, Aug 11, 11:39 AM
mstorsjo updated the diff for D36304: [lld] [COFF] Add support for aligncomm directives.

Thanks for the review! Updated with the changes that Rui requested.

Fri, Aug 11, 11:39 AM
mstorsjo updated the diff for D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

Renamed AArch64MCAsmInfoMicrosoft to AArch64MCAsmInfoMicrosoftCOFF.

Fri, Aug 11, 11:29 AM
mstorsjo added a comment to D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

@mstorsjo Shouldn't AArch64MCAsmInfoMicrosoft have the word COFF in it somewhere?

Fri, Aug 11, 7:37 AM

Thu, Aug 10

mstorsjo added a comment to D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile.

Instead of this patch, we could also update`getNameType` to check for decoration, e.g like this:

if (!Sym.startswith("?") && Sym.find('@', 1) != Sym.npos)
  return IMPORT_NAME_UNDECORATE;
Thu, Aug 10, 10:56 PM
mstorsjo updated the diff for D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

Fixed aliases with stdcall, added a test for that.

Thu, Aug 10, 10:41 PM
mstorsjo added inline comments to D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile.
Thu, Aug 10, 10:31 PM
mstorsjo added a comment to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

I'm confused to the purpose of the def files created at the time of linking a dll in that case.
Essentially the import library has information that the definition file is missing.
Thus we can not re-create the import library with that definition file, making it useless?

Thu, Aug 10, 5:36 AM
mstorsjo added a comment to D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

Ping @compnerd, any further comments on this?

Thu, Aug 10, 1:59 AM
mstorsjo updated subscribers of D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
Thu, Aug 10, 1:57 AM
mstorsjo added a comment to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

Once done, this should hopefully also go into 5.0, since without it, llvm-dlltool doesn't work for mingw-w64 for i386. It's not a regression but a tool that is new for 5.0.

Thu, Aug 10, 1:56 AM
mstorsjo updated subscribers of D36545: [LLD] [COFF] Fix the name type for stdcall functions in import libraries.

Forgot to say explicitly, that this depends on D36544. This also fixes a regression since 4.0, where linking to import libraries with stdcall creates broken executables. So once done, this and D36544 should be backported to 5.0, ping @hans.

Thu, Aug 10, 1:55 AM
mstorsjo updated the diff for D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

Changed the undecorate action into something that should work for all of cdecl/stdcall/fastcall/vectorcall. Vectorcall doesn't work here yet since the def parser always prepends an underscore though (and fixing that is a separate topic that involves quite a bit of lld as well), but at least this particular line should be mostly fine now.

Thu, Aug 10, 1:51 AM
mstorsjo added a comment to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

@martell - to further show the point I'm trying to explain, have a look at the testcase I'm adding in this patch - it shows exactly what should happen. A def file with a decorated name produces an import library with the symbols still decorated, but with the undecorate name type.

Thu, Aug 10, 12:12 AM
mstorsjo added a comment to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.

This is related to what we were talking about earlier on the mingw-w64 mailing list about unifying all def files for all 4 platforms. :)
Maybe we can add i386 to the unified version and add a flag when building mingw-w64 to use that along with using a flag to disable MingwDef.
In general though we do not want MingwDef to exist long term and I did not originally add this because .def files should not contain @4 @8 etc in the first place.

Thu, Aug 10, 12:02 AM

Wed, Aug 9

mstorsjo added inline comments to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
Wed, Aug 9, 2:02 PM
mstorsjo added inline comments to D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
Wed, Aug 9, 1:46 PM
mstorsjo created D36548: [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386.
Wed, Aug 9, 1:23 PM
mstorsjo added inline comments to D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile.
Wed, Aug 9, 1:03 PM
mstorsjo retitled D36545: [LLD] [COFF] Fix the name type for stdcall functions in import libraries from [COFF] Fix the name type for stdcall functions in import libraries to [LLD] [COFF] Fix the name type for stdcall functions in import libraries.
Wed, Aug 9, 12:51 PM
mstorsjo created D36545: [LLD] [COFF] Fix the name type for stdcall functions in import libraries.
Wed, Aug 9, 12:51 PM
mstorsjo created D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile.
Wed, Aug 9, 12:48 PM

Tue, Aug 8

mstorsjo added a comment to D36304: [lld] [COFF] Add support for aligncomm directives.

Rui, do you want to look more on this and the related references, or shall I go ahead and commit it?

Tue, Aug 8, 10:55 PM
mstorsjo accepted D36453: [libclang] Fix PR34055 (incompatible update of clang-c/Index.h).
Tue, Aug 8, 6:08 AM

Mon, Aug 7

mstorsjo committed rL310303: [AArch64] Ignore stdcall and similar on aarch64/windows.
[AArch64] Ignore stdcall and similar on aarch64/windows
Mon, Aug 7, 1:54 PM
mstorsjo closed D36105: [AArch64] Ignore stdcall and similar on aarch64/windows by committing rL310303: [AArch64] Ignore stdcall and similar on aarch64/windows.
Mon, Aug 7, 1:54 PM
mstorsjo added a comment to D36105: [AArch64] Ignore stdcall and similar on aarch64/windows.

Ping @mgrang, can you check the above with MSVC? I'd like to move forward with this in one form or another.

Yes, I checked with MSVC for ARM64 and it compiles without any warnings.

Mon, Aug 7, 11:50 AM
mstorsjo added a comment to D36105: [AArch64] Ignore stdcall and similar on aarch64/windows.

Ping @mgrang, can you check the above with MSVC? I'd like to move forward with this in one form or another.

Mon, Aug 7, 9:31 AM

Sun, Aug 6

mstorsjo committed rL310223: [llvm-dlltool] Map the "arm64" machine type.
[llvm-dlltool] Map the "arm64" machine type
Sun, Aug 6, 1:00 PM
mstorsjo closed D36365: [llvm-dlltool] Map the "arm64" machine type by committing rL310223: [llvm-dlltool] Map the "arm64" machine type.
Sun, Aug 6, 1:00 PM
mstorsjo committed rL310222: [test] Remove an unintentional -x cl flag in an aarch64-windows test.
[test] Remove an unintentional -x cl flag in an aarch64-windows test
Sun, Aug 6, 12:58 PM
mstorsjo closed D36363: [test] Remove an unintentional -x cl flag in an aarch64-windows test by committing rL310222: [test] Remove an unintentional -x cl flag in an aarch64-windows test.
Sun, Aug 6, 12:58 PM
mstorsjo updated the diff for D36364: [AArch64] Add support for a MinGW AArch64 target.

Added a fixme comment about this being incorrect for WinCE.

Sun, Aug 6, 12:49 PM
mstorsjo updated the diff for D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

Made the GNU case the default. Apparently I didn't have to update the existing test either, because aarch64-windows still triggers isWindowsMSVCEnvironment (but not isKnownWindowsMSVCEnvironment).

Sun, Aug 6, 12:45 PM
mstorsjo added a comment to D36379: LLVM: Make GNU COFF Aligncomm optional.

I think one important question that needs to be looked into is, does GNU ld align comm symbols at all if we omit this? There's a neat testcase in lld (COFF/common-something iirc) that you might use as base for figuring that out. If it doesn't, I'm afraid we can't do this.

Sun, Aug 6, 9:43 AM
mstorsjo added inline comments to D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.
Sun, Aug 6, 8:14 AM
mstorsjo added inline comments to D36364: [AArch64] Add support for a MinGW AArch64 target.
Sun, Aug 6, 8:09 AM
mstorsjo added inline comments to D36364: [AArch64] Add support for a MinGW AArch64 target.
Sun, Aug 6, 6:17 AM
mstorsjo updated the diff for D36364: [AArch64] Add support for a MinGW AArch64 target.

Updated to use a switch, added a mapping of a missed case of thumb while reformatting the if to a switch.

Sun, Aug 6, 6:13 AM
mstorsjo added inline comments to D36364: [AArch64] Add support for a MinGW AArch64 target.
Sun, Aug 6, 4:09 AM
mstorsjo updated the diff for D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

Limited the change to GNU environments.

Sun, Aug 6, 4:06 AM

Sat, Aug 5

mstorsjo added a comment to D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.

An example of where this is used is e.g. https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/stdio/scanf2-template.S (with aarch64 support is added in a patch at https://sourceforge.net/p/mingw-w64/mailman/message/35983275/).

Sat, Aug 5, 2:21 PM
mstorsjo added inline comments to D33880: COFF: Introduce LD shim around LINK.
Sat, Aug 5, 1:11 PM
mstorsjo created D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments.
Sat, Aug 5, 1:06 PM
mstorsjo created D36365: [llvm-dlltool] Map the "arm64" machine type.
Sat, Aug 5, 1:03 PM
mstorsjo created D36364: [AArch64] Add support for a MinGW AArch64 target.
Sat, Aug 5, 1:01 PM
mstorsjo created D36363: [test] Remove an unintentional -x cl flag in an aarch64-windows test.
Sat, Aug 5, 12:58 PM

Fri, Aug 4

mstorsjo added a comment to D36304: [lld] [COFF] Add support for aligncomm directives.
In D36304#831621, @ruiu wrote:

This patch looks good, but could you give me a pointer to the documentation for this feature?

Fri, Aug 4, 3:18 AM
mstorsjo added a comment to D33880: COFF: Introduce LD shim around LINK.

If you're still too busy and don't mind, I could also take over trying to get this in a mergeable form.

I can be on this to ensure it gets merged, there were 2 reasons why I left this slide for awhile.
I was having an issue with llvm-dlltool where if I used new to create memory for the strings it would work but if I done it the correct way as rui instructed it was not working correctly.
We now know that was because we were writing the strings beforehand the entry thanks to you :) So the 2 bugs because of the location of the the allocation seemed to nullify each other to some degree.
Which left me a little confused. So I left the lld support slide until llvm-dlltool was merged and also at the time I had started a new job.

Fri, Aug 4, 3:12 AM
mstorsjo created D36304: [lld] [COFF] Add support for aligncomm directives.
Fri, Aug 4, 1:58 AM
mstorsjo added a comment to D33880: COFF: Introduce LD shim around LINK.

Have been super busy with work, should have got around to this sooner sorry.

Fri, Aug 4, 1:44 AM
mstorsjo added inline comments to D33880: COFF: Introduce LD shim around LINK.
Fri, Aug 4, 1:40 AM

Thu, Aug 3

mstorsjo committed rL309974: [builtins] Use Interlocked* intrinsics for atomics on MSVC.
[builtins] Use Interlocked* intrinsics for atomics on MSVC
Thu, Aug 3, 12:05 PM
mstorsjo closed D36071: [builtins] Use Interlocked* intrinsics for atomics on MSVC by committing rL309974: [builtins] Use Interlocked* intrinsics for atomics on MSVC.
Thu, Aug 3, 12:05 PM