* 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.
This commit is contained in:
parent
b8720f9d57
commit
19f785835e
|
@ -1,3 +1,35 @@
|
|||
2001-08-04 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Tue Sep 4 20:01:19 2001 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* tc-h8300.c (tc_gen_reloc): Give an error if we try to take the
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -117,11 +117,10 @@ extern void alpha_frob_file_before_adjust PARAMS ((void));
|
|||
#define RELOC_OP_P
|
||||
#endif
|
||||
|
||||
#ifdef RELOC_OP_P
|
||||
/* Before the relocations are written, reorder them, so that user supplied
|
||||
!lituse relocations follow the appropriate !literal relocations. Also
|
||||
convert the gas-internal relocations to the appropriate linker relocations.
|
||||
*/
|
||||
/* Before the relocations are written, reorder them, so that user
|
||||
supplied !lituse relocations follow the appropriate !literal
|
||||
relocations. Also convert the gas-internal relocations to the
|
||||
appropriate linker relocations. */
|
||||
#define tc_adjust_symtab() alpha_adjust_symtab ()
|
||||
extern void alpha_adjust_symtab PARAMS ((void));
|
||||
|
||||
|
@ -133,14 +132,14 @@ extern void alpha_adjust_symtab PARAMS ((void));
|
|||
|
||||
struct alpha_fix_tag
|
||||
{
|
||||
struct fix *next_lituse; /* next !lituse */
|
||||
struct alpha_literal_tag *info; /* other members with same sequence */
|
||||
struct fix *next_reloc; /* next !lituse or !gpdisp */
|
||||
struct alpha_reloc_tag *info; /* other members with same sequence */
|
||||
};
|
||||
|
||||
/* Initialize the TC_FIX_TYPE field. */
|
||||
#define TC_INIT_FIX_DATA(fixP) \
|
||||
do { \
|
||||
fixP->tc_fix_data.next_lituse = (struct fix *)0; \
|
||||
fixP->tc_fix_data.next_reloc = (struct fix *)0; \
|
||||
fixP->tc_fix_data.info = (struct alpha_literal_tag *)0; \
|
||||
} while (0)
|
||||
|
||||
|
@ -148,10 +147,9 @@ do { \
|
|||
#define TC_FIX_DATA_PRINT(stream,fixP) \
|
||||
do { \
|
||||
if (fixP->tc_fix_data.info) \
|
||||
fprintf (stderr, "\tinfo = 0x%lx, next_lituse = 0x%lx\n", \
|
||||
fprintf (stderr, "\tinfo = 0x%lx, next_reloc = 0x%lx\n", \
|
||||
(long)fixP->tc_fix_data.info, \
|
||||
(long)fixP->tc_fix_data.next_lituse); \
|
||||
(long)fixP->tc_fix_data.next_reloc); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define DWARF2_LINE_MIN_INSN_LENGTH 4
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
.*: Assembler messages:
|
||||
.*:2: Error: No ldah !gpdisp!2 was found
|
||||
.*:1: Error: No lda !gpdisp!1 was found
|
|
@ -0,0 +1,2 @@
|
|||
ldah $29,0($26) !gpdisp!1
|
||||
lda $29,0($26) !gpdisp!2
|
|
@ -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
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
ldbu $1, a
|
||||
ldwu $2, b
|
||||
stb $3, c
|
||||
stw $4, 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 ................
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue