linux.h (90075) | linux.h (96263) |
---|---|
1/* Definitions for SPARC running Linux-based GNU systems with ELF. | 1/* Definitions for SPARC running Linux-based GNU systems with ELF. |
2 Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. | 2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. |
3 Contributed by Eddie C. Dost (ecd@skynet.be) 4 5This file is part of GNU CC. 6 7GNU CC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 2, or (at your option) 10any later version. --- 46 unchanged lines hidden (view full) --- 57/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on 58 the GNU/Linux magical crtend.o file (see crtstuff.c) which 59 provides part of the support for getting C++ file-scope static 60 object constructed before entering `main', followed by a normal 61 GNU/Linux "finalizer" file, `crtn.o'. */ 62 63#undef ENDFILE_SPEC 64#define ENDFILE_SPEC \ | 3 Contributed by Eddie C. Dost (ecd@skynet.be) 4 5This file is part of GNU CC. 6 7GNU CC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 2, or (at your option) 10any later version. --- 46 unchanged lines hidden (view full) --- 57/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on 58 the GNU/Linux magical crtend.o file (see crtstuff.c) which 59 provides part of the support for getting C++ file-scope static 60 object constructed before entering `main', followed by a normal 61 GNU/Linux "finalizer" file, `crtn.o'. */ 62 63#undef ENDFILE_SPEC 64#define ENDFILE_SPEC \ |
65 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" | 65 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ 66 %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" |
66 67/* This is for -profile to use -lc_p instead of -lc. */ 68#undef CC1_SPEC 69#define CC1_SPEC "%{profile:-p} \ 70%{sun4:} %{target:} \ 71%{mcypress:-mcpu=cypress} \ 72%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ 73%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ --- 18 unchanged lines hidden (view full) --- 92#define PTRDIFF_TYPE "int" 93 94#undef WCHAR_TYPE 95#define WCHAR_TYPE "int" 96 97#undef WCHAR_TYPE_SIZE 98#define WCHAR_TYPE_SIZE 32 99 | 67 68/* This is for -profile to use -lc_p instead of -lc. */ 69#undef CC1_SPEC 70#define CC1_SPEC "%{profile:-p} \ 71%{sun4:} %{target:} \ 72%{mcypress:-mcpu=cypress} \ 73%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ 74%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ --- 18 unchanged lines hidden (view full) --- 93#define PTRDIFF_TYPE "int" 94 95#undef WCHAR_TYPE 96#define WCHAR_TYPE "int" 97 98#undef WCHAR_TYPE_SIZE 99#define WCHAR_TYPE_SIZE 32 100 |
100#undef MAX_WCHAR_TYPE_SIZE 101 | |
102#undef CPP_PREDEFINES | 101#undef CPP_PREDEFINES |
103#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sparc__ -Dlinux -Asystem=unix -Asystem=posix" | 102#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sparc__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix" |
104 105#undef CPP_SUBTARGET_SPEC 106#ifdef USE_GNULIBC_1 107#define CPP_SUBTARGET_SPEC \ 108"%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \ 109%{mlong-double-128:-D__LONG_DOUBLE_128__}" 110#else 111#define CPP_SUBTARGET_SPEC \ --- 69 unchanged lines hidden (view full) --- 181 %{static:-static}}}" 182#endif 183 184/* The sun bundled assembler doesn't accept -Yd, (and neither does gas). 185 It's safe to pass -s always, even if -g is not used. */ 186#undef ASM_SPEC 187#define ASM_SPEC \ 188 "%{V} %{v:%{!V:-V}} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} \ | 103 104#undef CPP_SUBTARGET_SPEC 105#ifdef USE_GNULIBC_1 106#define CPP_SUBTARGET_SPEC \ 107"%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \ 108%{mlong-double-128:-D__LONG_DOUBLE_128__}" 109#else 110#define CPP_SUBTARGET_SPEC \ --- 69 unchanged lines hidden (view full) --- 180 %{static:-static}}}" 181#endif 182 183/* The sun bundled assembler doesn't accept -Yd, (and neither does gas). 184 It's safe to pass -s always, even if -g is not used. */ 185#undef ASM_SPEC 186#define ASM_SPEC \ 187 "%{V} %{v:%{!V:-V}} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} \ |
189 %{fPIC:-K PIC} %(asm_relax)" | 188 %{fPIC:-K PIC} %(asm_cpu) %(asm_relax)" |
190 191/* Same as sparc.h */ 192#undef DBX_REGISTER_NUMBER 193#define DBX_REGISTER_NUMBER(REGNO) (REGNO) 194 195#undef ASM_OUTPUT_ALIGNED_LOCAL 196#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 197do { \ 198 fputs ("\t.local\t", (FILE)); \ 199 assemble_name ((FILE), (NAME)); \ 200 putc ('\n', (FILE)); \ 201 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ 202} while (0) 203 204#undef COMMON_ASM_OP 205#define COMMON_ASM_OP "\t.common\t" 206 | 189 190/* Same as sparc.h */ 191#undef DBX_REGISTER_NUMBER 192#define DBX_REGISTER_NUMBER(REGNO) (REGNO) 193 194#undef ASM_OUTPUT_ALIGNED_LOCAL 195#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 196do { \ 197 fputs ("\t.local\t", (FILE)); \ 198 assemble_name ((FILE), (NAME)); \ 199 putc ('\n', (FILE)); \ 200 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ 201} while (0) 202 203#undef COMMON_ASM_OP 204#define COMMON_ASM_OP "\t.common\t" 205 |
206#undef LOCAL_LABEL_PREFIX 207#define LOCAL_LABEL_PREFIX "." 208 |
|
207/* This is how to output a definition of an internal numbered label where 208 PREFIX is the class of label and NUM is the number within the class. */ 209 210#undef ASM_OUTPUT_INTERNAL_LABEL 211#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 212 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM) 213 214/* This is how to output a reference to an internal numbered label where --- 27 unchanged lines hidden (view full) --- 242#else 243#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 244#endif 245 246#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) 247#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " 248#endif 249 | 209/* This is how to output a definition of an internal numbered label where 210 PREFIX is the class of label and NUM is the number within the class. */ 211 212#undef ASM_OUTPUT_INTERNAL_LABEL 213#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 214 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM) 215 216/* This is how to output a reference to an internal numbered label where --- 27 unchanged lines hidden (view full) --- 244#else 245#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 246#endif 247 248#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) 249#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " 250#endif 251 |
252/* Don't be different from other Linux platforms in this regard. */ 253#define HANDLE_PRAGMA_PACK_PUSH_POP 254 255/* We use GNU ld so undefine this so that attribute((init_priority)) works. */ 256#undef CTORS_SECTION_ASM_OP 257#undef DTORS_SECTION_ASM_OP 258 259/* Do code reading to identify a signal frame, and set the frame 260 state data appropriately. See unwind-dw2.c for the structs. */ 261 262#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ 263 do { \ 264 unsigned int *pc_ = (CONTEXT)->ra; \ 265 int new_cfa_, i_, oldstyle_; \ 266 int regs_off_, fpu_save_off_; \ 267 int fpu_save_, this_cfa_; \ 268 \ 269 if (pc_[1] != 0x91d02010) /* ta 0x10 */ \ 270 break; \ 271 if (pc_[0] == 0x821020d8) /* mov NR_sigreturn, %g1 */ \ 272 oldstyle_ = 1; \ 273 else if (pc_[0] == 0x82102065) /* mov NR_rt_sigreturn, %g1 */ \ 274 oldstyle_ = 0; \ 275 else \ 276 break; \ 277 if (oldstyle_) \ 278 { \ 279 regs_off_ = 96; \ 280 fpu_save_off_ = regs_off_ + (4 * 4) + (16 * 4); \ 281 } \ 282 else \ 283 { \ 284 regs_off_ = 96 + 128; \ 285 fpu_save_off_ = regs_off_ + (4 * 4) + (16 * 4) + (2 * 4); \ 286 } \ 287 this_cfa_ = (int) (CONTEXT)->cfa; \ 288 new_cfa_ = *(int *)(((CONTEXT)->cfa) + (regs_off_+(4*4)+(14 * 4))); \ 289 fpu_save_ = *(int *)((this_cfa_) + (fpu_save_off_)); \ 290 (FS)->cfa_how = CFA_REG_OFFSET; \ 291 (FS)->cfa_reg = 14; \ 292 (FS)->cfa_offset = new_cfa_ - (int) (CONTEXT)->cfa; \ 293 for (i_ = 1; i_ < 16; ++i_) \ 294 { \ 295 if (i_ == 14) \ 296 continue; \ 297 (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ 298 (FS)->regs.reg[i_].loc.offset = \ 299 this_cfa_ + (regs_off_+(4 * 4)+(i_ * 4)) - new_cfa_; \ 300 } \ 301 for (i_ = 0; i_ < 16; ++i_) \ 302 { \ 303 (FS)->regs.reg[i_ + 16].how = REG_SAVED_OFFSET; \ 304 (FS)->regs.reg[i_ + 16].loc.offset = \ 305 this_cfa_ + (i_ * 4) - new_cfa_; \ 306 } \ 307 if (fpu_save_) \ 308 { \ 309 for (i_ = 0; i_ < 32; ++i_) \ 310 { \ 311 (FS)->regs.reg[i_ + 32].how = REG_SAVED_OFFSET; \ 312 (FS)->regs.reg[i_ + 32].loc.offset = \ 313 (fpu_save_ + (i_ * 4)) - new_cfa_; \ 314 } \ 315 } \ 316 /* Stick return address into %g0, same trick Alpha uses. */ \ 317 (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \ 318 (FS)->regs.reg[0].loc.offset = this_cfa_+(regs_off_+4)-new_cfa_; \ 319 (FS)->retaddr_column = 0; \ 320 goto SUCCESS; \ 321 } while (0) |
|