mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:07:57 +00:00
[vm] Account for DBC32 when deciding between 32-bit and 64-bit ELF.
Change-Id: I1e8479927bf1f311c9500244f171eda46f105863 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104180 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
436c8d8a79
commit
0739387b05
|
@ -318,6 +318,20 @@ typedef simd128_value_t fpu_register_t;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
|
||||
#define TARGET_ARCH_IS_32_BIT 1
|
||||
#elif defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64)
|
||||
#define TARGET_ARCH_IS_64_BIT 1
|
||||
#elif defined(TARGET_ARCH_DBC)
|
||||
#if defined(ARCH_IS_32_BIT)
|
||||
#define TARGET_ARCH_IS_32_BIT 1
|
||||
#else
|
||||
#define TARGET_ARCH_IS_64_BIT 1
|
||||
#endif
|
||||
#else
|
||||
#error Automatic target architecture detection failed.
|
||||
#endif
|
||||
|
||||
// Verify that host and target architectures match, we cannot
|
||||
// have a 64 bit Dart VM generating 32 bit code or vice-versa.
|
||||
#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64)
|
||||
|
|
|
@ -63,10 +63,6 @@ static const intptr_t DT_SYMTAB = 6;
|
|||
static const intptr_t DT_STRSZ = 10;
|
||||
static const intptr_t DT_SYMENT = 11;
|
||||
|
||||
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
|
||||
#define TARGET_ARCH_IS_32_BIT 1
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_ARCH_IS_32_BIT)
|
||||
static const intptr_t kElfHeaderSize = 52;
|
||||
static const intptr_t kElfSectionTableEntrySize = 40;
|
||||
|
|
|
@ -48,7 +48,7 @@ class Elf : public ZoneAllocated {
|
|||
void WriteOff(uword value) {
|
||||
stream_->WriteBytes(reinterpret_cast<uint8_t*>(&value), sizeof(value));
|
||||
}
|
||||
#if defined(ARCH_IS_64_BIT)
|
||||
#if defined(TARGET_ARCH_IS_64_BIT)
|
||||
void WriteXWord(uint64_t value) {
|
||||
stream_->WriteBytes(reinterpret_cast<uint8_t*>(&value), sizeof(value));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue