gas_data_sizes.S: make PIE for all ISAs

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-09 00:00:02 +00:00
parent 7014d34576
commit 5d774c0947
3 changed files with 7 additions and 4 deletions

View File

@@ -3,6 +3,8 @@
#ifndef COMMON_ARCH_H
#define COMMON_ARCH_H
/* This and other macros may make C function calls, and therefore can destroy
* non-callee saved registers. */
#define ASSERT_EQ(general1, general2) \
mov general2, %rdi; \
push %rdi; \

View File

@@ -4,8 +4,9 @@
ENTRY
#define ASSERT_DIFF(label1, label2, result) \
mov $label2, %rax; \
sub $label1, %rax; \
lea label2(%rip), %rax; \
lea label1(%rip), %rbx; \
sub %rbx, %rax; \
ASSERT_EQ(%rax, $result)
ASSERT_DIFF(mybyte, myword, 1)