Commit 811b6a4e authored by Richard Townsend's avatar Richard Townsend Committed by Commit Bot

fixup: swap __asm for asm

__asm is an MSVC-specific syntax for inline assembly. Clang imitates it
- but only for x86/x64 targets. Using asm instead means it works on all
architectures.

Bug: 1108769
Change-Id: I83966999ffce13c412cc3c6f99ef9086a8a4295d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315871Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#791543}
parent 703bdaa8
...@@ -19,11 +19,7 @@ namespace { ...@@ -19,11 +19,7 @@ namespace {
// Function that can be jumped midway into safely. // Function that can be jumped midway into safely.
__attribute__((naked)) int nop_sled() { __attribute__((naked)) int nop_sled() {
__asm { asm("nop; nop; ret");
nop
nop
ret
}
} }
using FuncType = decltype(&nop_sled); using FuncType = decltype(&nop_sled);
......
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