-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[wasm] initial build of coreclr.runtime #113429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0f3a52a
1407d39
3edff36
b936f4b
2b9e9df
ccc7210
90efb82
081e254
7336750
772b9ed
1d30e31
6ad0e75
0c2152b
82a5a62
45e543e
0a37bcd
f6bbf03
6700a05
c522e49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| //***************************************************************************** | ||
| // File: primitives.h | ||
| // | ||
|
|
||
| // | ||
| // Platform-specific debugger primitives | ||
| // | ||
| //***************************************************************************** | ||
|
|
||
| #ifndef PRIMITIVES_H_ | ||
| #define PRIMITIVES_H_ | ||
|
|
||
| inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr) | ||
| { | ||
| _ASSERTE("The function is not implemented on wasm"); | ||
| return patchAddr; | ||
| } | ||
|
|
||
| typedef const BYTE CORDB_ADDRESS_TYPE; | ||
| typedef DPTR(CORDB_ADDRESS_TYPE) PTR_CORDB_ADDRESS_TYPE; | ||
|
|
||
| //This is an abstraction to keep x86/ia64 patch data separate | ||
| #define PRD_TYPE USHORT | ||
|
|
||
| #define MAX_INSTRUCTION_LENGTH 2 // update once we have codegen | ||
|
|
||
| #define CORDbg_BREAK_INSTRUCTION_SIZE 1 | ||
| #define CORDbg_BREAK_INSTRUCTION 0 // unreachable intruction | ||
|
|
||
| inline bool PRDIsEmpty(PRD_TYPE p1) | ||
| { | ||
| LIMITED_METHOD_CONTRACT; | ||
|
|
||
| return p1 == 0; | ||
| } | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -338,7 +338,7 @@ inline UINT64 AlignUp(UINT64 value, UINT alignment) | |
| return (value+alignment-1)&~(UINT64)(alignment-1); | ||
| } | ||
|
|
||
| #ifdef __APPLE__ | ||
| #if defined(__APPLE__) || defined(__wasm__) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear to me why we need this for wasm when it was used on apple only before.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is 32bit SIZE_T again, without this change the calls to AlighnUp with SIZE_T argument are ambiguous between UINT and UINT64 versions. |
||
| inline SIZE_T AlignUp(SIZE_T value, UINT alignment) | ||
| { | ||
| STATIC_CONTRACT_LEAF; | ||
|
|
@@ -399,13 +399,13 @@ inline UINT AlignmentPad(UINT64 value, UINT alignment) | |
| return (UINT) (AlignUp(value, alignment) - value); | ||
| } | ||
|
|
||
| #ifdef __APPLE__ | ||
| #if defined(__APPLE__) || defined(__wasm__) | ||
| inline UINT AlignmentPad(SIZE_T value, UINT alignment) | ||
| { | ||
| STATIC_CONTRACT_WRAPPER; | ||
| return (UINT) (AlignUp(value, alignment) - value); | ||
| } | ||
| #endif // __APPLE__ | ||
| #endif // __APPLE__ || __wasm__ | ||
|
|
||
| inline UINT AlignmentTrim(UINT value, UINT alignment) | ||
| { | ||
|
|
@@ -432,7 +432,7 @@ inline UINT AlignmentTrim(UINT64 value, UINT alignment) | |
| return ((UINT)value)&(alignment-1); | ||
| } | ||
|
|
||
| #ifdef __APPLE__ | ||
| #if defined(__APPLE__) || defined(__wasm__) | ||
| inline UINT AlignmentTrim(SIZE_T value, UINT alignment) | ||
| { | ||
| STATIC_CONTRACT_LEAF; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,11 @@ inline ReadyToRunCrossModuleInlineFlags operator &( const ReadyToRunCrossModuleI | |
| return static_cast<ReadyToRunCrossModuleInlineFlags>(static_cast<uint32_t>(left) & static_cast<uint32_t>(right)); | ||
| } | ||
|
|
||
| #ifdef TARGET_WASM | ||
| // why was it defined only for x86 before? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because all other platforms have it defined in either the pal.h or in the Windows SDK.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see it in pal.h, so is it in the windows sdk then? |
||
| typedef DPTR(RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION; | ||
| #endif | ||
|
|
||
| #ifdef TARGET_X86 | ||
|
|
||
| typedef DPTR(RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.