[patch] arc-elf32
Peter.Target@arccores.com
Peter.Target@arccores.com
Wed Jan 24 09:12:00 GMT 2001
Ok to apply fixes? Plus these submitted previously:
http://sources.redhat.com/ml/binutils/2001-01/msg00222.html .
Also noticed that CVS still contains test files that can be removed ->
gas/testsuite/gas/arc/alias.*, branch.*, insn3.*, math.*, sshift.*.
Cheers,
Peter
2001-01-24 Peter Targett <peter.targett@arccores.com>
* bfd/elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
architecture.
(arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
2001-01-24 Peter Targett <peter.targett@arccores.com>
* config/tc-arc.c (arc_code_symbol): Make symbol value for @h30
fixup expression equal to O_constant.
(md_assemble): Call dwarf2_emit_insn.
Add include of "dwarf2dbg2.h".
* config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
2001-01-24 Peter Targett <peter.targett@arccores.com>
* gas/arc/st.s: Add test case @h30 fixup.
* gas/arc/st.d: Update to suit.
Index: bfd/elf32-arc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arc.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 elf32-arc.c
*** elf32-arc.c 2001/01/11 21:20:16 1.3
--- elf32-arc.c 2001/01/24 16:13:43
***************
*** 1,5 ****
/* ARC-specific support for 32-bit ELF
! Copyright (C) 1994, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
--- 1,5 ----
/* ARC-specific support for 32-bit ELF
! Copyright (C) 1994, 95, 97, 99, 2000, 2001 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
*************** static boolean
*** 155,161 ****
arc_elf_object_p (abfd)
bfd *abfd;
{
! int mach = bfd_mach_arc_5;
if (elf_elfheader(abfd)->e_machine == EM_ARC)
{
--- 155,161 ----
arc_elf_object_p (abfd)
bfd *abfd;
{
! int mach = bfd_mach_arc_6;
if (elf_elfheader(abfd)->e_machine == EM_ARC)
{
*************** arc_elf_object_p (abfd)
*** 163,172 ****
switch (arch)
{
- default:
case E_ARC_MACH_ARC5:
mach = bfd_mach_arc_5;
break;
case E_ARC_MACH_ARC6:
mach = bfd_mach_arc_6;
break;
--- 163,172 ----
switch (arch)
{
case E_ARC_MACH_ARC5:
mach = bfd_mach_arc_5;
break;
+ default:
case E_ARC_MACH_ARC6:
mach = bfd_mach_arc_6;
break;
*************** arc_elf_final_write_processing (abfd, li
*** 193,202 ****
switch (bfd_get_mach (abfd))
{
- default:
case bfd_mach_arc_5:
val = E_ARC_MACH_ARC5;
break;
case bfd_mach_arc_6:
val = E_ARC_MACH_ARC6;
break;
--- 193,202 ----
switch (bfd_get_mach (abfd))
{
case bfd_mach_arc_5:
val = E_ARC_MACH_ARC5;
break;
+ default:
case bfd_mach_arc_6:
val = E_ARC_MACH_ARC6;
break;
Index: gas/config/tc-arc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arc.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 tc-arc.c
*** tc-arc.c 2001/01/15 01:37:20 1.10
--- tc-arc.c 2001/01/24 16:13:44
***************
*** 1,5 ****
/* tc-arc.c -- Assembler for the ARC
! Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
--- 1,5 ----
/* tc-arc.c -- Assembler for the ARC
! Copyright (C) 1994, 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
***************
*** 27,32 ****
--- 27,33 ----
#include "opcode/arc.h"
#include "../opcodes/arc-ext.h"
#include "elf/arc.h"
+ #include "dwarf2dbg.h"
extern int arc_get_mach PARAMS ((char *));
extern int arc_operand_type PARAMS ((int));
*************** const pseudo_typeS md_pseudo_table[] = {
*** 88,93 ****
--- 89,96 ----
{ "word", cons, 4 },
{ "option", arc_option, 0 },
{ "block", s_space, 0 },
+ { "file", dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
{ "extcondcode", arc_extoper, 0 },
{ "extcoreregister", arc_extoper, 1 },
{ "extauxregister", arc_extoper, 2 },
*************** md_assemble (str)
*** 866,871 ****
--- 869,875 ----
}
/* All done. */
+ dwarf2_emit_insn (4);
return;
}
*************** arc_code_symbol (expressionP)
*** 1630,1635 ****
--- 1634,1640 ----
{
expressionS two;
expressionP->X_op = O_right_shift;
+ expressionP->X_add_symbol->sy_value.X_op = O_constant;
two.X_op = O_constant;
two.X_add_symbol = two.X_op_symbol = NULL;
two.X_add_number = 2;
Index: gas/config/tc-arc.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arc.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 tc-arc.h
*** tc-arc.h 2001/01/14 18:54:06 1.6
--- tc-arc.h 2001/01/24 16:13:44
***************
*** 1,5 ****
/* tc-arc.h - Macros and type defines for the ARC.
! Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
--- 1,5 ----
/* tc-arc.h - Macros and type defines for the ARC.
! Copyright (C) 1994, 1995, 1997, 2001 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
*************** arc_parse_cons_expression (EXP, NBYTES)
*** 66,68 ****
--- 66,70 ----
extern void arc_cons_fix_new ();
#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
arc_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
+
+ #define DWARF2_LINE_MIN_INSN_LENGTH 4
Index: gas/testsuite/gas/arc/st.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arc/st.d,v
retrieving revision 1.2
diff -c -3 -p -r1.2 st.d
*** st.d 2001/01/11 21:20:18 1.2
--- st.d 2001/01/24 16:13:44
*************** Disassembly of section .text:
*** 23,27 ****
34: 02 02 01 14 14010202 st.di r1,\[r2,2\]
38: 03 02 01 15 15010203 st.a.di r1,\[r2,3\]
3c: 04 02 81 15 15810204 stw.a.di r1,\[r2,4\]
! 40: 00 02 01 12 12010200 sr r1,\[r2\]
! 44: 0e 82 1f 12 121f820e sr r1,\[0xe\]
--- 23,33 ----
34: 02 02 01 14 14010202 st.di r1,\[r2,2\]
38: 03 02 01 15 15010203 st.a.di r1,\[r2,3\]
3c: 04 02 81 15 15810204 stw.a.di r1,\[r2,4\]
! 40: 04 7c 06 10 10067c04 st 80,\[r12,4\]
! 44: 50 00 00 00
! 44: R_ARC_32 .text
! 48: 04 7c 06 10 10067c04 st 20,\[r12,4\]
! 4c: 14 00 00 00
! 4c: R_ARC_B26 .text
! 50: 00 02 01 12 12010200 sr r1,\[r2\]
! 54: 0e 82 1f 12 121f820e sr r1,\[0xe\]
Index: gas/testsuite/gas/arc/st.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arc/st.s,v
retrieving revision 1.2
diff -c -3 -p -r1.2 st.s
*** st.s 2001/01/11 21:20:18 1.2
--- st.s 2001/01/24 16:13:44
***************
*** 13,18 ****
--- 13,22 ----
st.di r1,[r2,2]
st.a.di r1,[r2,3]
stw.a.di r1,[r2,4]
+
+ st .L1,[r12,4]
+ st .L1@h30,[r12,4]
+ .L1:
sr r1,[r2]
sr r1,[14]
More information about the Binutils
mailing list