Skip to content
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

Fix AArch64 test runner #538

Merged
merged 2 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions include/remill/Arch/Runtime/Intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ __remill_write_memory_64(Memory *, addr_t, uint64_t);

[[gnu::used]] extern float80_t __remill_read_memory_f80(Memory *, addr_t);

[[gnu::used]] extern float64_t __remill_read_memory_f128(Memory *, addr_t);
[[gnu::used]] extern float128_t __remill_read_memory_f128(Memory *, addr_t);

[[gnu::used, gnu::const]] extern Memory *
__remill_write_memory_f32(Memory *, addr_t, float32_t);
Expand All @@ -71,7 +71,7 @@ __remill_write_memory_f64(Memory *, addr_t, float64_t);
float80_t);

[[gnu::used]] extern Memory *__remill_write_memory_f128(Memory *, addr_t,
float64_t);
float128_t);

[[gnu::used, gnu::const]] extern uint8_t __remill_undefined_8(void);

Expand All @@ -87,6 +87,8 @@ __remill_write_memory_f64(Memory *, addr_t, float64_t);

[[gnu::used, gnu::const]] extern float80_t __remill_undefined_f80(void);

[[gnu::used, gnu::const]] extern float128_t __remill_undefined_f128(void);

// Generic error.
[[gnu::used]] extern Memory *__remill_error(State &, addr_t addr, Memory *);

Expand Down
13 changes: 5 additions & 8 deletions tests/AArch64/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,9 @@ MAKE_RW_MEMORY(64)

MAKE_RW_FP_MEMORY(32)
MAKE_RW_FP_MEMORY(64)
MAKE_RW_FP_MEMORY(80)
MAKE_RW_FP_MEMORY(128)

NEVER_INLINE float64_t __remill_read_memory_f80(Memory *, addr_t) {
abort();
}

NEVER_INLINE Memory *__remill_write_memory_f80(Memory *, addr_t, float64_t) {
abort();
}

Memory *__remill_compare_exchange_memory_8(Memory *memory, addr_t addr,
uint8_t &expected, uint8_t desired) {
expected = __sync_val_compare_and_swap(reinterpret_cast<uint8_t *>(addr),
Expand Down Expand Up @@ -338,6 +331,10 @@ float80_t __remill_undefined_f80(void) {
return {0};
}

float128_t __remill_undefined_f128(void) {
return {0};
}

// Marks `mem` as being used. This is used for making sure certain symbols are
// kept around through optimization, and makes sure that optimization doesn't
// perform dead-argument elimination on any of the intrinsics.
Expand Down
11 changes: 1 addition & 10 deletions tests/X86/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,7 @@ MAKE_RW_MEMORY(64)
MAKE_RW_FP_MEMORY(32)
MAKE_RW_FP_MEMORY(64)
MAKE_RW_FP_MEMORY(80)

NEVER_INLINE float64_t __remill_read_memory_f128(Memory *, addr_t) {
LOG(FATAL) << "Unsupported on x86/amd64";
return 0.0;
}

NEVER_INLINE Memory *__remill_write_memory_f128(Memory *, addr_t, double) {
LOG(FATAL) << "Unsupported on x86/amd64";
return nullptr;
}
MAKE_RW_FP_MEMORY(128)


Memory *__remill_compare_exchange_memory_8(Memory *memory, addr_t addr,
Expand Down