Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2009 19:53:23 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 158281 for review
Message-ID:  <200902251953.n1PJrN1V021320@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=158281

Change 158281 by gonzo@gonzo_figaro on 2009/02/25 19:52:55

	- Add AVR32 bits to as(1)

Affected files ...

.. //depot/projects/avr32/src/contrib/binutils/gas/Makefile.am#2 edit
.. //depot/projects/avr32/src/contrib/binutils/gas/as.c#2 edit
.. //depot/projects/avr32/src/contrib/binutils/gas/config/tc-avr32.c#1 add
.. //depot/projects/avr32/src/contrib/binutils/gas/config/tc-avr32.h#1 add
.. //depot/projects/avr32/src/contrib/binutils/gas/write.c#2 edit

Differences ...

==== //depot/projects/avr32/src/contrib/binutils/gas/Makefile.am#2 (text+ko) ====

@@ -45,6 +45,7 @@
 	arc \
 	arm \
 	avr \
+	avr32 \
 	cris \
 	d10v \
 	d30v \
@@ -241,6 +242,7 @@
 	config/tc-arc.c \
 	config/tc-arm.c \
 	config/tc-avr.c \
+	config/tc-avr32.c \
 	config/tc-cris.c \
 	config/tc-d10v.c \
 	config/tc-d30v.c \
@@ -293,6 +295,7 @@
 	config/tc-arc.h \
 	config/tc-arm.h \
 	config/tc-avr.h \
+	config/tc-avr32.h \
 	config/tc-cris.h \
 	config/tc-d10v.h \
 	config/tc-d30v.h \
@@ -1040,6 +1043,11 @@
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
   $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
   $(INCDIR)/opcode/avr.h
+DEPTC_avr32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+  $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr32.h \
+  $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+  $(srcdir)/../opcodes/avr32-opc.h $(srcdir)/../opcodes/avr32-asm.h
 DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
   $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
@@ -1618,6 +1626,11 @@
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
   $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
   struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_avr32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+  $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr32.h \
+  $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+  struc-symbol.h dwarf2dbg.h
 DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
   $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
@@ -2111,6 +2124,9 @@
 DEP_avr_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
   $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
+DEP_avr32_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+  $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr32.h
 DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
 DEP_cris_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \

==== //depot/projects/avr32/src/contrib/binutils/gas/as.c#2 (text+ko) ====

@@ -734,6 +734,16 @@
 	case 'a':
 	  if (optarg)
 	    {
+ 	      /* If optarg is part of the -a switch and not a separate argument
+ 		 in its own right, then scan backwards to the just after the -a.
+ 		 This means skipping over both '=' and 'l' which might have been
+ 		 taken to be part of the -a switch itself.  */
+ 	      if (optarg != old_argv[optind])
+ 		{
+ 		  while (optarg[-1] == '=' || optarg[-1] == 'l')
+ 		    --optarg;
+ 		}
+
 	      if (md_parse_option (optc, optarg) != 0)
 		break;
 

==== //depot/projects/avr32/src/contrib/binutils/gas/write.c#2 (text+ko) ====

@@ -2130,6 +2130,10 @@
 
 #endif /* defined (TC_GENERIC_RELAX_TABLE)  */
 
+#ifdef TC_RELAX_ALIGN
+#define RELAX_ALIGN(SEG, FRAG, ADDR) TC_RELAX_ALIGN(SEG, FRAG, ADDR)
+#else
+#define RELAX_ALIGN(SEG, FRAG, ADDR) relax_align(ADDR, (FRAG)->fr_offset)
 /* Relax_align. Advance location counter to next address that has 'alignment'
    lowest order bits all 0s, return size of adjustment made.  */
 static relax_addressT
@@ -2149,6 +2153,7 @@
 #endif
   return (new_address - address);
 }
+#endif
 
 /* Now we have a segment, not a crowd of sub-segments, we can make
    fr_address values.
@@ -2192,7 +2197,7 @@
 	case rs_align_code:
 	case rs_align_test:
 	  {
-	    addressT offset = relax_align (address, (int) fragP->fr_offset);
+	    addressT offset = RELAX_ALIGN(segment, fragP, address);
 
 	    if (fragP->fr_subtype != 0 && offset > fragP->fr_subtype)
 	      offset = 0;
@@ -2352,10 +2357,10 @@
 		{
 		  addressT oldoff, newoff;
 
-		  oldoff = relax_align (was_address + fragP->fr_fix,
-					(int) offset);
-		  newoff = relax_align (address + fragP->fr_fix,
-					(int) offset);
+		  oldoff = RELAX_ALIGN (segment, fragP,
+					was_address + fragP->fr_fix);
+		  newoff = RELAX_ALIGN (segment, fragP,
+					address + fragP->fr_fix);
 
 		  if (fragP->fr_subtype != 0)
 		    {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902251953.n1PJrN1V021320>