diff options
author | Richard Henderson <rth@redhat.com> | 2001-09-05 02:39:43 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2001-09-05 02:39:43 +0000 |
commit | 19f785835e5e97a7c666e8f942cb4ec8e543aebc (patch) | |
tree | 2449f5d4aa18964c87052a617c6f0af5b3191e54 /gas/testsuite | |
parent | b8720f9d577e623c5e7203ec586f19a06b5e7399 (diff) | |
download | gdb-19f785835e5e97a7c666e8f942cb4ec8e543aebc.zip gdb-19f785835e5e97a7c666e8f942cb4ec8e543aebc.tar.gz gdb-19f785835e5e97a7c666e8f942cb4ec8e543aebc.tar.bz2 |
* config/tc-alpha.c (struct alpha_insn): Make sequence scalar long.
(MACRO_LITERAL, MACRO_BASE, MACRO_BYTOFF, MACRO_JSR): Remove.
(alpha_macros): Remove occurrences of same.
(O_lituse_addr, O_gprel): New.
(DUMMY_RELOC_LITUSE_*): New.
(s_alpha_ucons, s_alpha_arch): Prototype.
(alpha_reloc_op): Construct elements via DEF macro.
(ALPHA_RELOC_SEQUENCE_OK): Remove.
(struct alpha_reloc_tag): Rename from alpha_literal_tag; rename
members to not be literal specific.
(next_sequence_num): New.
(md_apply_fix3): Cope with missing GPDISP_LO16. Adjust for
added/removed BFD relocations.
(alpha_force_relocation, alpha_fix_adjustable): Likewise.
(alpha_adjust_symtab_relocs): Handle GPDISP relocs as well.
(tokenize_arguments): Parse ! relocations properly.
(find_macro_match): Delete unused macro argument types.
(assemble_insn): Add reloc parameter; emit that instead of the
default as appropriate.
(get_alpha_reloc_tag): New. Split from ...
(emit_insn): ... here. Allocate a reloc tag for GPDISP.
(assemble_tokens): Don't search macros if user relocation present.
Copy reloc sequence number to insn struct.
(emit_ldgp): Remove user reloc handling.
(load_expression, emit_lda, emit_ldah, emit_ir_load): Likewise.
(emit_loadstore, emit_ldXu, emit_ldil, emit_stX): Likewise.
(emit_sextX, emit_division, emit_jsrjmp, emit_retjcr): Likewise.
* config/tc-alpha.h (tc_adjust_symtab): Always define.
(struct alpha_fix_tag): Name members less literal specific.
* gas/alpha/alpha.exp: New file.
* gas/alpha/elf-reloc-1.[sd]: New test.
* gas/alpha/elf-reloc-2.[sl]: New test.
* gas/alpha/elf-reloc-3.[sl]: New test.
* gas/alpha/elf-reloc-4.[sd]: New test.
* gas/alpha/fp.exp: Remove file.
* gas/alpha/fp.s: Output to .data not .rdata.
* gas/alpha/fp.d: Adjust to match.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/alpha.exp | 33 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-1.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-1.s | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-2.l | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-2.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-3.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-3.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-4.d | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/elf-reloc-4.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/fp.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/fp.exp | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/alpha/fp.s | 2 |
13 files changed, 132 insertions, 18 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 11f0a0a..6398610 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2001-08-04 Richard Henderson <rth@redhat.com> + + * gas/alpha/alpha.exp: New file. + * gas/alpha/elf-reloc-1.[sd]: New test. + * gas/alpha/elf-reloc-2.[sl]: New test. + * gas/alpha/elf-reloc-3.[sl]: New test. + * gas/alpha/elf-reloc-4.[sd]: New test. + * gas/alpha/fp.exp: Remove file. + * gas/alpha/fp.s: Output to .data not .rdata. + * gas/alpha/fp.d: Adjust to match. + Tue Sep 4 20:06:09 2001 Jeffrey A Law (law@cygnus.com) * gas/all/gas.exp (930509a): Expect failure on the H8/300 ELF port. diff --git a/gas/testsuite/gas/alpha/alpha.exp b/gas/testsuite/gas/alpha/alpha.exp new file mode 100644 index 0000000..4bc54f4 --- /dev/null +++ b/gas/testsuite/gas/alpha/alpha.exp @@ -0,0 +1,33 @@ +# +# Some generic alpha tests +# + +proc run_list_test { name opts } { + global srcdir subdir + set testname "alpha $name" + set file $srcdir/$subdir/$name + gas_run ${name}.s $opts ">&dump.out" + if { [regexp_diff "dump.out" "${file}.l"] } then { + fail $testname + verbose "output is [file_contents "dump.out"]" 2 + return + } + pass $testname +} + +if { [istarget alpha*-*-*] } then { + + set elf [expr [istarget *-*-elf*] \ + || [istarget *-*-linux*] \ + || [istarget *-*-freebsd*] \ + || [istarget *-*-netbsd*] ] + + if $elf { + run_dump_test "elf-reloc-1" + run_list_test "elf-reloc-2" "" + run_list_test "elf-reloc-3" "" + run_dump_test "elf-reloc-4" + } + + run_dump_test "fp" +} diff --git a/gas/testsuite/gas/alpha/elf-reloc-1.d b/gas/testsuite/gas/alpha/elf-reloc-1.d new file mode 100644 index 0000000..660f393 --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-1.d @@ -0,0 +1,21 @@ +#objdump: -r +#name: alpha elf-reloc-1 + +.*: file format elf64-alpha + +RELOCATION RECORDS FOR \[\.text\]: +OFFSET TYPE VALUE +0*0000004 ELF_LITERAL a +0*0000000 LITUSE \.text\+0x0*0000002 +0*000000c LITUSE \.text\+0x0*0000001 +0*0000008 ELF_LITERAL b +0*0000010 ELF_LITERAL f +0*0000014 LITUSE \.text\+0x0*0000003 +0*0000014 HINT f +0*0000018 GPREL16 c +0*000001c GPRELHIGH d +0*0000020 GPRELLOW e +0*0000024 GPDISP \.text\+0x0*0000008 +0*0000030 GPDISP \.text\+0xf*ffffff8 + + diff --git a/gas/testsuite/gas/alpha/elf-reloc-1.s b/gas/testsuite/gas/alpha/elf-reloc-1.s new file mode 100644 index 0000000..7114f57 --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-1.s @@ -0,0 +1,16 @@ + .set nomacro + extbl $3, $2, $3 ! lituse_bytoff ! 1 + ldq $2, a($29) !literal!1 + ldq $4, b($29) !literal!2 + ldq_u $3, 0($2) !lituse_base!1 + ldq $27, f($29) !literal!5 + jsr $26, ($27), f !lituse_jsr!5 + + lda $0, c($29) !gprel + ldah $1, d($29) !gprelhigh + lda $1, e($1) !gprellow + + ldah $29, 0($26) !gpdisp!3 + lda $29, 0($29) !gpdisp!4 + lda $29, 0($29) !gpdisp!3 + ldah $29, 0($26) !gpdisp!4 diff --git a/gas/testsuite/gas/alpha/elf-reloc-2.l b/gas/testsuite/gas/alpha/elf-reloc-2.l new file mode 100644 index 0000000..8353a7e --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-2.l @@ -0,0 +1,4 @@ +.*: Assembler messages: +.*:4: Error: too many ldah insns for !gpdisp!3 +.*:5: Error: too many lda insns for !gpdisp!3 +.*:8: Error: both insns for !gpdisp!4 must be in the same section diff --git a/gas/testsuite/gas/alpha/elf-reloc-2.s b/gas/testsuite/gas/alpha/elf-reloc-2.s new file mode 100644 index 0000000..b53b7eb --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-2.s @@ -0,0 +1,8 @@ + .text + ldah $29,0($26) !gpdisp!3 + lda $29,0($26) !gpdisp!3 + ldah $29,0($26) !gpdisp!3 + lda $29,0($26) !gpdisp!3 + ldah $29,0($26) !gpdisp!4 + .section .text2 + lda $29,0($26) !gpdisp!4 diff --git a/gas/testsuite/gas/alpha/elf-reloc-3.l b/gas/testsuite/gas/alpha/elf-reloc-3.l new file mode 100644 index 0000000..764dfb7 --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-3.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:2: Error: No ldah !gpdisp!2 was found +.*:1: Error: No lda !gpdisp!1 was found diff --git a/gas/testsuite/gas/alpha/elf-reloc-3.s b/gas/testsuite/gas/alpha/elf-reloc-3.s new file mode 100644 index 0000000..c3d959e --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-3.s @@ -0,0 +1,2 @@ + ldah $29,0($26) !gpdisp!1 + lda $29,0($26) !gpdisp!2 diff --git a/gas/testsuite/gas/alpha/elf-reloc-4.d b/gas/testsuite/gas/alpha/elf-reloc-4.d new file mode 100644 index 0000000..f149298 --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-4.d @@ -0,0 +1,25 @@ +#objdump: -r +#name: alpha elf-reloc-4 + +.*: file format elf64-alpha + +RELOCATION RECORDS FOR \[\.text\]: +OFFSET TYPE VALUE +0*0000000 ELF_LITERAL a +0*0000004 LITUSE \.text\+0x0*0000001 +0*0000008 LITUSE \.text\+0x0*0000002 +0*000000c ELF_LITERAL b +0*0000010 LITUSE \.text\+0x0*0000001 +0*0000014 LITUSE \.text\+0x0*0000002 +0*0000018 ELF_LITERAL c +0*000001c LITUSE \.text\+0x0*0000001 +0*0000020 LITUSE \.text\+0x0*0000002 +0*0000024 LITUSE \.text\+0x0*0000002 +0*000002c LITUSE \.text\+0x0*0000001 +0*0000030 ELF_LITERAL d +0*0000034 LITUSE \.text\+0x0*0000001 +0*0000038 LITUSE \.text\+0x0*0000002 +0*000003c LITUSE \.text\+0x0*0000002 +0*0000044 LITUSE \.text\+0x0*0000001 + + diff --git a/gas/testsuite/gas/alpha/elf-reloc-4.s b/gas/testsuite/gas/alpha/elf-reloc-4.s new file mode 100644 index 0000000..dfd2eeb --- /dev/null +++ b/gas/testsuite/gas/alpha/elf-reloc-4.s @@ -0,0 +1,4 @@ + ldbu $1, a + ldwu $2, b + stb $3, c + stw $4, d diff --git a/gas/testsuite/gas/alpha/fp.d b/gas/testsuite/gas/alpha/fp.d index 9e6f7e9..06f6c8e 100644 --- a/gas/testsuite/gas/alpha/fp.d +++ b/gas/testsuite/gas/alpha/fp.d @@ -1,7 +1,9 @@ +#objdump: -s -j .data +#name: alpha fp -.*: file format ecoff-littlealpha +.*: file format .* -Contents of section .rdata: +Contents of section .data: 0000 71a37909 4f930a40 5441789a cd4b881b q.y.O..@TAx..K.. 0010 2a404f93 790971a3 789a5440 5441789a .@O.y.q.x.T@TAx. 0020 00000000 00000000 00000000 00000000 ................ diff --git a/gas/testsuite/gas/alpha/fp.exp b/gas/testsuite/gas/alpha/fp.exp deleted file mode 100644 index 05ec881..0000000 --- a/gas/testsuite/gas/alpha/fp.exp +++ /dev/null @@ -1,15 +0,0 @@ -# -# Alpha OSF/1 tests -# - -if [istarget alpha-*-osf*] then { - set testname "fp constants (part 2)" - if [gas_test_old "fp.s" "" "fp constants (part 1)"] then { - objdump "-s -j .rdata > a.dump" - if { [regexp_diff "a.dump" "$srcdir/$subdir/fp.d"] == 0 } then { - pass $testname - } else { - fail $testname - } - } -} diff --git a/gas/testsuite/gas/alpha/fp.s b/gas/testsuite/gas/alpha/fp.s index 7cebbbe..e29393e 100644 --- a/gas/testsuite/gas/alpha/fp.s +++ b/gas/testsuite/gas/alpha/fp.s @@ -1,4 +1,4 @@ - .rdata + .data # These three formats are 8 bytes each. .t_floating 3.32192809488736218171e0 # .byte 0x71, 0xa3, 0x79, 0x09, 0x4f, 0x93, 0x0a, 0x40 |