Skip to content

Commit 1423c03

Browse files
add volatile to asm() and some line break.
1 parent 3dd2f4d commit 1423c03

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libunwind/src/Registers.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,18 +1838,18 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18381838
inline uint64_t auth(uint64_t ptr, uint64_t salt) const {
18391839
register uint64_t x17 __asm("x17") = ptr;
18401840
register uint64_t x16 __asm("x16") = salt;
1841-
asm("hint 0xc" // autia1716
1842-
: "+r"(x17)
1843-
: "r"(x16)
1844-
:);
1841+
asm volatile ("hint 0xc" // autia1716
1842+
: "+r"(x17)
1843+
: "r"(x16)
1844+
:);
18451845

18461846
uint64_t checkValue = ptr;
18471847
// Support for machines without FPAC.
18481848
// Strip the upper bits with `XPACLRI` and compare with the
18491849
// authenticated value.
1850-
asm("mov x30, %[checkValue] \r\n"
1851-
"hint 0x7 \r\n"
1852-
"mov %[checkValue], x30 \r\n"
1850+
asm volatile ("mov x30, %[checkValue] \r\n" \
1851+
"hint 0x7 \r\n" \
1852+
"mov %[checkValue], x30 \r\n" \
18531853
: [checkValue] "+r"(checkValue)
18541854
:
18551855
: "x30");
@@ -1862,7 +1862,7 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18621862
inline void updatePC(uint64_t value) {
18631863
register uint64_t x17 __asm("x17") = value;
18641864
register uint64_t x16 __asm("x16") = getAuthSalt();
1865-
asm("hint 0x8" : "+r"(x17) : "r"(x16)); // pacia1716
1865+
asm volatile("hint 0x8" : "+r"(x17) : "r"(x16)); // pacia1716
18661866
_registers.__pc = x17;
18671867
}
18681868
#else //! defined(_LIBUNWIND_IS_NATIVE_ONLY)

0 commit comments

Comments
 (0)