This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Darwin specific codegen improvements (2)


Add support for printing lo16(constant) on darwin.
Bootstrapped & tested on darwin.


2001-12-05  Dale Johannesen   <dalej@apple.com>

         * config/rs6000/rs6000.c (print_operand_address):  add
         support for Darwin's lo16(constant) syntax.


RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.250
diff -u -d -b -w -c -3 -p -r1.250 rs6000.c
cvs server: conflicting specifications of output style
*** rs6000.c    2001/12/03 19:13:35     1.250
--- rs6000.c    2001/12/05 19:12:33
*************** print_operand_address (file, x)
*** 5604,5609 ****
--- 5602,5616 ----
         fprintf (file, "@l(%s)", reg_names[ REGNO (XEXP (x, 0)) ]);
       }
   #endif
+ #if TARGET_MACHO
+   else if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 0)) == REG
+            && CONSTANT_P (XEXP (x, 1)))
+     {
+       fprintf (file, "lo16(");
+       output_addr_const (file, XEXP (x, 1));
+       fprintf (file, ")(%s)", reg_names[ REGNO (XEXP (x, 0)) ]);
+     }
+ #endif
     else if (LEGITIMATE_CONSTANT_POOL_ADDRESS_P (x))
       {
         if (TARGET_AIX && (!TARGET_ELF || !TARGET_MINIMAL_TOC))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]