summaryrefslogtreecommitdiff
path: root/src/ilasm
AgeCommit message (Collapse)AuthorFilesLines
2019-02-26GCC compatibility fixes #7 (#22810)Sinan Kaya2-2/+2
* Use thread_local for thread local storage on non MSVC targets * Use local copy of visitor rather than function parameter * Remove extra class qualifier * Replace hex number representation in ASM files * Reorder STDAPI and DLLEXPORT * Suppress conversion Suppress warning during hash add casting * Remove anonymous struct src/vm/codeversion.h:112:16: warning: ‘struct NativeCodeVersion::<anonymous union>::SyntheticStorage’ invalid; an anonymous union can only have non-static data members [-fpermissive] struct SyntheticStorage * Remove class declaration Remove extra class declaration * Remove extern C * Add implicit paranthesis src/vm/amd64/virtualcallstubcpu.hpp:735:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF; ^ src/vm/amd64/virtualcallstubcpu.hpp:741:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF; Add parenthesis src/vm/dataimage.cpp:631:55: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size Add parenthesis src/debug/daccess/daccess.cpp:6871:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] _ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL); Add parenthesis src/vm/dataimage.cpp:631:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size) * Initialize member 1 src/ilasm/method.cpp:35:36: warning: operation on ‘((Method*)this)->Method::m_ulColumns[0]’ may be undefined [-Wsequence-point] m_ulColumns[0]=m_ulColumns[0]=0; * Remove unknown compiler option * Abstract DLLEXPORT
2019-02-22More GNUC Fixes (#22687)Sinan Kaya1-1/+1
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2018-11-06Remove /RESOURCE flag documentation on ilasm. (#20818)Jeremy Koritzinsky1-1/+0
* Remove /RESOURCE flag on ilasm. * Revert "Remove /RESOURCE flag on ilasm." This reverts commit 7d1a9ac959a94359d2f1ef5f70ec7041804ec6f4. * Update documentation in ilasm switches. * Update documentation to say that the obj file has to come from a .res file. * Remove documentation of the /RESOURCE switch. Leave the switch code-path in place for corefx.
2018-10-31Remove superfluous 'const' qualifier from trivial return types (#20652)Michał Janiszewski1-1/+1
The 'const' used in this context has no meaning
2018-10-16Remove ExportStubARM64Template supportBruce Forstall1-17/+0
2018-10-16Clarify /ARM64 argument usageBruce Forstall1-1/+2
2018-10-15Add ARM64 support to ilasm/ilasmBruce Forstall4-106/+94
Remove IA-64/Itanium support.
2018-10-03Add MethodImplOptions.AggressiveOptimization and use it for tiering (#20009)Koundinya Veluri2-1724/+1732
Add MethodImplOptions.AggressiveOptimization and use it for tiering Part of fix for https://github.com/dotnet/corefx/issues/32235 Workaround for https://github.com/dotnet/coreclr/issues/19751 - Added and set CORJIT_FLAG_AGGRESSIVE_OPT to indicate that a method is flagged with AggressiveOptimization - For a method flagged with AggressiveOptimization, tiering uses a foreground tier 1 JIT on first call to the method, skipping the tier 0 JIT and call counting - When tiering is disabled, a method flagged with AggressiveOptimization does not use r2r-pregenerated code - R2r crossgen does not generate code for a method flagged with AggressiveOptimization
2018-09-25Add header files to ildasm, ilasm vcxproj (#20052)Jacek Blaszczynski1-1/+17
2018-06-03Typo (#18266)John Doe2-2/+2
* addres -> address * depedant -> dependent * gaurantee -> guarantee * gaurantees -> guarantees * lable -> label * lazieness -> laziness * lcoation -> location * enquing -> enqueuing * enregsitered -> enregistered * ensurin -> ensuring
2018-02-17delete unused mirror files (#16423)Sergey Andreenko1-1/+0
2017-11-12Port https://github.com/dotnet/coreclr/pull/13148 to master (#14999)Michal Strehovský1-9/+19
2017-11-12Allow non-abstract non-public interface methods in ILAsm (#14998)Michal Strehovský2-19/+0
This is to support the default interface method feature in C#. See https://github.com/dotnet/csharplang/blob/5971e753a20a32e5f471a5439c88e667e32413f0/proposals/default-interface-methods.md
2017-05-09Fix static analysis issues (#11466)Koundinya Veluri1-2/+9
Fix static analysis issues
2017-05-03Fix some static analysis warningsRuss Keldorph1-7/+17
Most fixes are just addressing the use of (signed) enum-typed variables as array indices. Casting to unsigned allows us to cheaply include the lower bound checks in the existing upper bound checks. I would prefer to force the underlying types of enumerations to be unsigned, but that is a relatively new C++ feature and could have broader consequences than I want to risk at this point. The one other fix to asmparse.cpp just suppresses a warning that, while technically valid, is not causing a real problem. Perhaps this will get better if/when #2305 is addressed.
2017-04-26Lookup System.Runtime and mscorlib references by Assembly nameMichael Letterle3-4/+25
Rather than by alias. Fixes #10595
2017-04-17Do not throw an assertion on no mscorlibMichael Letterle1-3/+4
It's okay to use debuggable attributes from other BaseAsmRef's Fixes #10608
2017-04-10Added netstandard corelib into ilasm reference resolverRoman Artemev1-1/+6
2017-04-06Correct fix for long ilasm paramsRoman Artemev1-6/+4
2017-03-28Removing Unnecessary CloseBuffer callsRama Krishnan Raghupathy1-1/+0
2017-02-24Increase the length of allowed parameters in ilasm.Eric Mellino1-1/+1
The way this code is structured prevents parameters longer than 128 characters from being passed. This change simply increases that to 1024 characters, although a more robust change could be made in the future to account for platform differences.
2017-02-15Enable delay signing in ilasmMichelle McDaniel2-0/+67
Corefx needs the .Net Core version of ilasm to create delay signable assemblies. This change brings back AllocateStrongNameSignature that was deleted in 2efbb92 and modifies it to use similar logic from Roslyn to determine the size of the signature that we need to allocate space for. Fixes #9292.
2017-02-12Comment for Gauravdanmosemsft1-2/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft12-734/+0
2017-02-08[x86/Linux] Fix Calling Convertion Mismatch inside ilasm/ildasm (#9410)Jonghyun Park1-1/+1
2017-01-15Remove mscorpe cruft (#8957)mikedn3-59/+6
2016-12-09Remove sscanf and sprintf usage (#8508)Jan Vorlicek1-1/+1
* Remove sscanf * Remove sprintf
2016-11-21Remove unsafe banned functions (#8162)Jan Vorlicek1-1/+1
This change removes _snwprintf, _snprintf and _vsnwprintf usage from CoreCLR and their implementations from PAL. PAL exposes their secure variants instead and CoreCLR now uses those instead. I have also removed the StringCchPrintfA/W, StringCchVPrintfA/W, StringCbVPrintfA/W, StringCbPrintfA/W, StringCbPrintfExA/W, StringCchVPrintfExA/W, StringCbVPrintfExA/W and StringCchPrintfExA/W replaced their usage by the secure variants of the sprintf functions, since they were used at only few places and implementing all of the variants using the secure sprintf variants would be a hassle. I also needed to fix a missing support for size modifiers for %p formatting character and for wide characters / strings in the secure sprintf functions that was revealed by the PAL tests. I have also removed a bunch of PAL tests that were using %n formatting character which was not implemented since it is considered unsafe and translated PAL tests that were using the removed functions to use the safe variants of those.
2016-10-19Fix broken range checkDmitry-Me1-1/+1
2016-09-07Fix strict aliasing violation from conditional typedef of wchar_t by ↵kchoi2-6/+5
building entire project as C++ for Unix (#6801) Enable building CoreCLR as C++ project on Unix This series of patches fixes the strict aliasing violation from the conditional typedef of wchar_t in src/pal/inc/pal_char16.h:40 * rename c files to cpp * modify all cmake files to change .c files to .cpp * apply c++ linkage to templates
2016-06-02Fix Details for ILAsm/ILDasm/ClrJit BinariesKyungwoo Lee1-0/+6
Fixes https://github.com/dotnet/coreclr/issues/5408
2016-05-16Initial change to support System.Private.CoreLib.dll as Core Library.Gaurav Khanna1-1/+1
2016-04-18enable build of cross target components.Rahul Kumar1-1/+1
Currently only enabled for arm64
2016-04-16Cleanup VCRuntime140.dll dependency from native componentsGaurav Khanna1-1/+0
2016-03-22Strip symbols on release builds into separate binariesMike McLaughlin1-4/+1
Issue #3669 Created a common cmake strip_symbols function that all the modules and programs use to strip the symbols out of the main into a separate .dbg (Linux) or .dSYM (OSX) file. Added an install_clr cmake function to encapsulate the install logic. Changed all the library module cmake install lines from a TARGETS to a FILES one. The TARGETS based install directives caused cmake to relink the binary and copy the unstripped version to the install path. Left the all programs like corerun or ildasm as TARGETS installs because on OSX FILES type installs don't get marked as executable. Need to use "get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION)" for the older versions of cmake and "set(strip_source_file $<TARGET_FILE:${targetName}>)" on newer versions (v3 or greater).
2016-03-14ILAsm/ILDAsm packagesdotnet-bot1-0/+1
This creates packages for ILAsm/ILDAsm respectively. These tools depend on CoreCLR, so they are tied together with the same version. Note we use ProjectK build for packaging Windows binaries so these tools are basically desktop one while cross-platform binaries are from Github build as usual. When CoreCLR packaging and publication are migrated to Github build, so will these tools. [tfs-changeset: 1585183]
2016-02-19This Change Adds initial Support for LongFiles in the VM,Rama Krishnan Raghupathy2-18/+18
They are: 1. Wrappers for OS APIs which take or return PATHS 2. Fixing the usage of following Api's: GetEnvironmentVariableW SearchPathW GetShortPathNameW GetLongPathNameW GetModuleFileName Work remaining: Remove fixed size buffers in the VM
2016-02-17Fix Init to return False when not being able to load executableManu1-0/+4
2016-02-02Delete spurious ilasm warning message under DEBUG flagKyungwoo Lee1-2/+4
When test population, most il tests turn on DEBUG flag, which caused spurious warnings on ilasm/CoreCLR since PDB is not yet supported. This changes the warning display to a comment that is linked to a GH issue.
2016-01-27Update license headersdotnet-bot27-107/+82
2016-01-22NetBSD: Don't link with -ldl for dlopen(3) on NetBSDKamil Rytarowski1-3/+3
NAME dlopen, dlclose, dlsym, dlvsym, dladdr, dlctl, dlerror - dynamic link interface LIBRARY (These functions are not in a library. They are included in every dynamically linked program automatically.) SYNOPSIS #include <dlfcn.h> void * dlopen(const char *path, int mode);
2016-01-14Enable the fPIE compiler option for executables in the coreclr repo on Unix ↵Sergiy Kuryata1-0/+4
platforms
2016-01-04Fix bad-codegen from ilasmKyungwoo Lee1-3/+3
Switch target should be 4 byte instead of 8 byte. In Windows, size of long is same as size of int which is 4 byte, but this is 8 byte in Unix.
2016-01-01Enable ilasm round trip test for xPlatformsKyungwoo Lee1-0/+2
1. Enable CLRTest.Execute.Bash.targets similar to CLRTest.Execute.Batch.targets. 2. _IlasmSwitches uses '-' instead of '/' 3. Disable optimization on the prebuilt asmparse.c due to https://github.com/dotnet/coreclr/issues/2305
2015-12-28Fix assertion in ilasmKyungwoo Lee1-7/+4
This is a simple fix for incorrect assertion. Assertion location is changed and dwErrorIndex is zero-initialized. ilasm on coreclr does not handle permission set/security attribute which coreclr does not support. So, such attempt will end up with emitting error on coreclr instead of failing to assert.
2015-12-11Fix desktop build of ilasmBruce Forstall1-2/+1
[tfs-changeset: 1557090]
2015-12-11Enable ILASM for *nixKyungwoo Lee13-85/+214
This enables ILASM for x-platforms. 1. Added a bunch of warning disable options mostly due to this prebuilt asmparse.cpp 2. Create a separte entry point "main" to pass WCHAR arguments. 3. PDB (CorSymWriter) part is disabled. 4. Converting/embedding resource file to binary is disabled. 5. jkotas kindly provided a code for IsTextUnicode which is unavailable on CoreCLR.
2015-12-09Enable ILASM for WindowsKyungwoo Lee8-5/+5020
This enables ILASM/mscorpe on CoreCLR for Windows. 1. Fusion/StrongName(Full Sign) dependencies are removed since these are not CoreCLR features. 2. mscorpe is statically built/linked to ilasm. 3. asmparse.c is auto-generated by an internal version of yacc so I added it under prebuilt directory for now. Will create an issue so that we can build it using a standard tool like bison.
2015-12-08Open sourcing ILASMdotnet-bot28-0/+16523
[tfs-changeset: 1555681]