Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: tests/dynamic_code_loading/dynamic_load_test.c

Issue 11194045: Change BKPT and UDF encodings on ARM. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Update copyright. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/debug_stub/debugger_test.c ('k') | tests/dynamic_code_loading/dyncode_demand_alloc_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dynamic_code_loading/dynamic_load_test.c
diff --git a/tests/dynamic_code_loading/dynamic_load_test.c b/tests/dynamic_code_loading/dynamic_load_test.c
index 22558ad09bf09c8f8fc12a4a6b216598c156a754..dc6c970ee7adb20408d0e43210dd1a68bee4eb48 100644
--- a/tests/dynamic_code_loading/dynamic_load_test.c
+++ b/tests/dynamic_code_loading/dynamic_load_test.c
@@ -14,6 +14,7 @@
#include <nacl/nacl_dyncode.h>
+#include "native_client/src/include/arm_sandbox.h"
#include "native_client/tests/dynamic_code_loading/dynamic_segment.h"
#include "native_client/tests/dynamic_code_loading/templates.h"
#include "native_client/tests/inbrowser_test_runner/test_runner.h"
@@ -81,7 +82,7 @@ void fill_hlts(uint8_t *data, size_t size) {
#if defined(__i386__) || defined(__x86_64__)
memset(data, 0xf4, size); /* HLTs */
#elif defined(__arm__)
- fill_int32(data, size, 0xe1266676); /* BKPT 0x6666 */
+ fill_int32(data, size, NACL_INSTR_HALT_FILL);
#else
# error "Unknown arch"
#endif
@@ -484,17 +485,16 @@ void test_deleting_code_from_invalid_ranges() {
}
void check_region_is_filled_with_hlts(const char *data, size_t size) {
- uint8_t halts[] =
#if defined(__i386__) || defined(__x86_64__)
- { 0xf4 }; /* HLT */
+ uint8_t halts = 0xf4; /* HLT */
#elif defined(__arm__)
- { 0x76, 0x66, 0x26, 0xe1 }; /* 0xe1266676 - BKPT 0x6666 */
+ uint32_t halts = NACL_INSTR_HALT_FILL;
#else
# error "Unknown arch"
#endif
const char *ptr;
for (ptr = data; ptr < data + size; ptr += sizeof(halts)) {
- assert(memcmp(ptr, halts, sizeof(halts)) == 0);
+ assert(memcmp(ptr, &halts, sizeof(halts)) == 0);
}
}
« no previous file with comments | « tests/debug_stub/debugger_test.c ('k') | tests/dynamic_code_loading/dyncode_demand_alloc_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698