old-cross-binutils/gas/testsuite/gas/i386/gotpc.s
Jakub Jelinek 2bbd9c2554 * config/tc-i386.c (output_insn): Save frag_now and frag_now_fix ()
at start of insn, pass it to output_disp and output_imm.
	(output_disp): Added arguments.  If _GLOBAL_OFFSET_TABLE_ is seen
	in displacement for R_386_32 reloc, use R_386_GOTPC and compute
	properly addend.
	(output_imm): Added arguments.  Compute properly addend for
	R_386_GOTPC.
	(md_apply_fix3): Remove R_386_GOTPC handling.
	* testsuite/gas/i386/gotpc.s: New.
	* testsuite/gas/i386/gotpc.d: New.
	* testsuite/gas/i386/i386.exp: Add gotpc test.
2002-08-09 00:10:19 +00:00

40 lines
1.6 KiB
ArmAsm

.text
test:
addl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
addl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
addl $_GLOBAL_OFFSET_TABLE_, %eax
addl $_GLOBAL_OFFSET_TABLE_, %ebx
leal _GLOBAL_OFFSET_TABLE_+[.-test](%eax), %ebx
leal _GLOBAL_OFFSET_TABLE_+[.-test](%ebx), %eax
leal _GLOBAL_OFFSET_TABLE_+[.-test](%eax), %eax
leal _GLOBAL_OFFSET_TABLE_+[.-test](%ebx), %ebx
subl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
subl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
subl $_GLOBAL_OFFSET_TABLE_, %eax
subl $_GLOBAL_OFFSET_TABLE_, %ebx
orl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
orl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
orl $_GLOBAL_OFFSET_TABLE_, %eax
orl $_GLOBAL_OFFSET_TABLE_, %ebx
movl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
movl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
movl $_GLOBAL_OFFSET_TABLE_, %eax
movl $_GLOBAL_OFFSET_TABLE_, %ebx
movl $_GLOBAL_OFFSET_TABLE_+[.-test], foo
movl $_GLOBAL_OFFSET_TABLE_+[.-test], %gs:foo
gs; movl $_GLOBAL_OFFSET_TABLE_+[.-test], foo
movl $_GLOBAL_OFFSET_TABLE_+[.-test], _GLOBAL_OFFSET_TABLE_
movl _GLOBAL_OFFSET_TABLE_+[.-test], %eax
movl _GLOBAL_OFFSET_TABLE_+[.-test], %ebx
movl %eax, _GLOBAL_OFFSET_TABLE_+[.-test]
movl %ebx, _GLOBAL_OFFSET_TABLE_+[.-test]
movl %eax, %gs:_GLOBAL_OFFSET_TABLE_+[.-test]
movl %ebx, %gs:_GLOBAL_OFFSET_TABLE_+[.-test]
gs; movl %eax, _GLOBAL_OFFSET_TABLE_+[.-test]
gs; movl %ebx, _GLOBAL_OFFSET_TABLE_+[.-test]
leal _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %eax
leal _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %ebx
movl _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %eax
movl _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %ebx
.long _GLOBAL_OFFSET_TABLE_+[.-test]
.long _GLOBAL_OFFSET_TABLE_@GOTOFF