Commit 086d0c49 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[cctest][arm64] Fix debug disassembler test with no simulator.

This test would fail when running natively on arm64. If USE_SIMULATOR isn't
defined, then the assembler always generates a brk instruction, regarless of the
`enable_simulator_code` Assembler option.

Change-Id: Id56788ba60ab4a13857825ebf09bf55375250c9d
Reviewed-on: https://chromium-review.googlesource.com/1174712Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#55148}
parent db145a41
......@@ -4098,6 +4098,10 @@ void Assembler::debug(const char* message, uint32_t code, Instr params) {
return;
}
// Fall through if Serializer is enabled.
#else
// Make sure we haven't dynamically enabled simulator code when there is no
// simulator built in.
DCHECK(!options().enable_simulator_code);
#endif
if (params & BREAK) {
......
......@@ -1882,7 +1882,11 @@ TEST_(debug) {
byte* buf = static_cast<byte*>(malloc(INSTR_SIZE));
uint32_t encoding = 0;
AssemblerOptions options;
#ifdef USE_SIMULATOR
options.enable_simulator_code = (i == 1);
#else
CHECK(!options.enable_simulator_code);
#endif
Assembler* assm = new Assembler(options, buf, INSTR_SIZE);
Decoder<DispatchingDecoderVisitor>* decoder =
new Decoder<DispatchingDecoderVisitor>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment