From f65153ab5b3447f59deb3bd4ef60e7deed36aefb Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 26 Nov 2020 17:52:11 +0000 Subject: [PATCH] sclog: put x86-specific parts under ifdef. This allows my side-channel test system to at least _compile_ on other architectures without failing for the lack of OP_xxx enum constants, although it now won't log all the things it needs to be a proper test. --- test/sclog/sclog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/sclog/sclog.c b/test/sclog/sclog.c index 5c377eb5..85bfc322 100644 --- a/test/sclog/sclog.c +++ b/test/sclog/sclog.c @@ -400,6 +400,7 @@ static dr_emit_flags_t instrument_instr( int opcode = instr_get_opcode(instr); switch (opcode) { +#if defined(X86) case OP_div: case OP_idiv: /* @@ -413,6 +414,8 @@ static dr_emit_flags_t instrument_instr( 3, instr_get_src(instr, 2), instr_get_src(instr, 0), OPND_CREATE_INTPTR(loc)); break; +#endif +#if defined(X86) case OP_shl: case OP_shr: case OP_sar: @@ -445,6 +448,7 @@ static dr_emit_flags_t instrument_instr( } break; } +#endif } return DR_EMIT_DEFAULT;