update copyright dates
[deliverable/binutils-gdb.git] / gas / config / tc-spu.h
index 134c17915c3be75a107eec5cf6cfb363ede045f7..5047d35e3ed1b9768c7abb95034305070125db80 100644 (file)
@@ -1,12 +1,12 @@
 /* spu.h -- Assembler for spu
 
-   Copyright 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -50,7 +50,8 @@ struct tc_fix_info {
 #define tc_fix_adjustable(FIXP) \
   (!(S_IS_FUNCTION ((FIXP)->fx_addsy)                  \
      || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32       \
-     || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64))
+     || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64       \
+     || (FIXP)->fx_r_type == BFD_RELOC_SPU_ADD_PIC))
 
 /* Keep relocs on calls.  Branches to function symbols are tail or
    sibling calls.  */
@@ -63,6 +64,7 @@ struct tc_fix_info {
        && S_IS_FUNCTION ((FIXP)->fx_addsy))            \
    || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32         \
    || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64         \
+   || (FIXP)->fx_r_type == BFD_RELOC_SPU_ADD_PIC       \
    || generic_force_reloc (FIXP))
 
 /* Values passed to md_apply_fix don't include symbol values.  */
@@ -85,11 +87,21 @@ struct tc_fix_info {
 /* We don't need to do anything special for undefined symbols.  */
 #define md_undefined_symbol(s) 0
 
-/* We have no special operand handling.  */
-#define md_operand(e)
+extern symbolS *section_symbol (asection *);
+#define md_operand(e) \
+  do {                                                         \
+    if (strncasecmp (input_line_pointer, "@ppu", 4) == 0)      \
+      {                                                                \
+       e->X_op = O_symbol;                                     \
+       if (abs_section_sym == NULL)                            \
+         abs_section_sym = section_symbol (absolute_section);  \
+       e->X_add_symbol = abs_section_sym;                      \
+       e->X_add_number = 0;                                    \
+      }                                                                \
+  } while (0)
 
 /* Fill in rs_align_code fragments.  */
-extern void spu_handle_align PARAMS ((fragS *));
+extern void spu_handle_align (fragS *);
 #define HANDLE_ALIGN(frag)  spu_handle_align (frag)
 
 #define MAX_MEM_FOR_RS_ALIGN_CODE  (7 + 8)
This page took 0.02654 seconds and 4 git commands to generate.