Commit c5678d44 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

base: support ImmediateCrashTest on mac arm64

This platform sometimes has a spare BRK #1 at the end of
IMMEDIATE_CRASH, for secretive compiler reasons. Allow
for that here.

Bug: 1128436,1121871
Change-Id: I86cb8d015b2ec6c5b6160a6db28682faa9dc4c77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415092
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807674}
parent bb0841c6
......@@ -150,6 +150,18 @@ TEST(ImmediateCrashTest, ExpectedOpcodeSequence) {
// BRK #1
EXPECT_EQ(0XD4200020, *++it);
#elif defined(OS_MAC)
// BRK #0
EXPECT_EQ(0XD4200000, *++it);
// HLT #0
EXPECT_EQ(0XD4400000, *++it);
// Allow, but do not require, a BRK #1 after the HLT; some clangs emit this
// for __builtin_unreachable() but some do not.
if (*++it != 0XD4200020)
--it;
#else
// BRK #0
......
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