Skip to content

Commit

Permalink
i#1569: Fix AArch64 build broken by 914d4df.
Browse files Browse the repository at this point in the history
Avoid "unused variable" warnings and define XINST_CREATE_store_1byte.

Review-URL: https://codereview.appspot.com/304390043
  • Loading branch information
egrimley-arm committed Aug 8, 2016
1 parent 575e7a5 commit e7b2650
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/arch/aarch64/instr_create.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@
*/
#define XINST_CREATE_store(dc, m, r) INSTR_CREATE_str((dc), (m), (r))

/**
* This platform-independent macro creates an instr_t for a 1-byte
* memory store instruction.
* \param dc The void * dcontext used to allocate memory for the instr_t.
* \param m The destination memory opnd.
* \param r The source register opnd.
*/
#define XINST_CREATE_store_1byte(dc, m, r) \
((void)(m), (void)(r), INSTR_CREATE_xx((dc), 0x25865b)) /* FIXME i#1569 */

/**
* This platform-independent macro creates an instr_t for a 2-byte
* memory store instruction.
Expand Down
14 changes: 14 additions & 0 deletions ext/drx/drx_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ drx_buf_insert_buf_store_1byte(void *drcontext, drx_buf_t *buf, instrlist_t *ili
(drcontext,
OPND_CREATE_MEM8(buf_ptr, offset),
opnd_create_reg(scratch));
#else
/* FIXME i#1569: NYI */
DR_ASSERT(false);
instr = NULL;
#endif
} else {
instr = XINST_CREATE_store_1byte
Expand Down Expand Up @@ -487,6 +491,10 @@ drx_buf_insert_buf_store_2bytes(void *drcontext, drx_buf_t *buf, instrlist_t *il
(drcontext,
OPND_CREATE_MEM16(buf_ptr, offset),
opnd_create_reg(scratch));
#else
/* FIXME i#1569: NYI */
DR_ASSERT(false);
instr = NULL;
#endif
} else {
instr = XINST_CREATE_store_2bytes
Expand Down Expand Up @@ -566,6 +574,12 @@ drx_buf_insert_buf_store_ptrsz(void *drcontext, drx_buf_t *buf, instrlist_t *ili
opnd_create_reg(scratch));
INSTR_XL8(instr, instr_get_app_pc(where));
MINSERT(ilist, where, instr);
#else
/* FIXME i#1569: NYI */
DR_ASSERT(false);
first = NULL;
last = NULL;
immed = 0;
#endif
} else {
instr_t *instr = XINST_CREATE_store
Expand Down

0 comments on commit e7b2650

Please sign in to comment.