1 /* Parameters for execution on a Sun 4, for GDB, the GNU debugger.
2 Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@mcc.com)
4 This file is part of GDB.
6 GDB is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option)
11 GDB is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GDB; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24 /* Define the bit, byte, and word ordering of the machine. */
25 #define BITS_BIG_ENDIAN
26 #define BYTES_BIG_ENDIAN
27 #define WORDS_BIG_ENDIAN
29 /* Floating point is IEEE compatible. */
32 /* Get rid of any system-imposed stack limit if possible. */
34 #define SET_STACK_LIMIT_HUGE
36 /* Define this if the C compiler puts an underscore at the front
37 of external names before giving them to the linker. */
39 #define NAMES_HAVE_UNDERSCORE
41 /* Debugger information will be in DBX format. */
43 #define READ_DBX_FORMAT
45 /* When passing a structure to a function, Sun cc passes the address
46 in a register, not the structure itself. It (under SunOS4) creates
47 two symbols, so we get a LOC_ARG saying the address is on the stack
48 (a lie, and a serious one since we don't know which register to
49 use), and a LOC_REGISTER saying that the struct is in a register
50 (sort of a lie, but fixable with REG_STRUCT_HAS_ADDR).
52 This still doesn't work if the argument is not one passed in a
53 register (i.e. it's the 7th or later argument). */
54 #define REG_STRUCT_HAS_ADDR(gcc_p) (!gcc_p)
55 #define STRUCT_ARG_SYM_GARBAGE(gcc_p) (!gcc_p)
57 /* If Pcc says that a parameter is a short, it's a short. This is
58 because the parameter does get passed in in a register as an int,
59 but pcc puts it onto the stack frame as a short (not nailing
60 whatever else might be there. I'm not sure that I consider this
63 No, don't do this. The problem here is that pcc says that the
64 argument is in the upper half of the word reserved on the stack,
65 but puts it in the lower half. */
66 /* #define BELIEVE_PCC_PROMOTION 1 */
67 /* OK, I've added code to dbxread.c to deal with this case. */
68 #define BELIEVE_PCC_PROMOTION_TYPE
70 /* Offset from address of function to start of its code.
71 Zero on most machines. */
73 #define FUNCTION_START_OFFSET 0
75 /* Advance PC across any function entry prologue instructions
76 to reach some "real" code. */
78 #define SKIP_PROLOGUE(pc) \
79 { pc = skip_prologue (pc); }
81 /* Immediately after a function call, return the saved pc.
82 Can't go through the frames for this because on some machines
83 the new frame is not set up until the new function executes
86 /* On the Sun 4 under SunOS, the compile will leave a fake insn which
87 encodes the structure size being returned. If we detect such
88 a fake insn, step past it. */
90 #define PC_ADJUST(pc) ((read_memory_integer (pc + 8, 4) & 0xfffffe00) == 0 ? \
93 #define SAVED_PC_AFTER_CALL(frame) PC_ADJUST (read_register (RP_REGNUM))
95 /* Address of end of stack space. */
96 #include <sys/types.h>
97 #include <machine/vmparam.h>
98 #define STACK_END_ADDR USRSTACK
102 /* Stack has strict alignment. */
104 #define STACK_ALIGN(ADDR) (((ADDR)+7)&-8)
106 /* Sequence of bytes for breakpoint instruction. */
108 #define BREAKPOINT {0x91, 0xd0, 0x20, 0x01}
110 /* Amount PC must be decremented by after a breakpoint.
111 This is often the number of bytes in BREAKPOINT
114 #define DECR_PC_AFTER_BREAK 0
116 /* Nonzero if instruction at PC is a return instruction. */
117 /* For SPARC, this is either a "jmpl %o7+8,%g0" or "jmpl %i7+8,%g0".
119 Note: this does not work for functions returning structures under SunOS. */
120 #define ABOUT_TO_RETURN(pc) \
121 ((read_memory_integer (pc, 4)|0x00040000) == 0x81c7e008)
123 /* Return 1 if P points to an invalid floating point value. */
125 #define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
127 /* Largest integer type */
130 /* Name of the builtin type for the LONGEST type above. */
131 #define BUILTIN_TYPE_LONGEST builtin_type_long
133 /* Say how long (ordinary) registers are. */
135 #define REGISTER_TYPE long
137 /* Number of machine registers */
141 /* Initializer for an array of names of registers.
142 There should be NUM_REGS strings in this initializer. */
144 #define REGISTER_NAMES \
145 { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
146 "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
147 "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
148 "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \
150 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
151 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
152 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
153 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
155 "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr" };
157 /* Register numbers of various important registers.
158 Note that some of these values are "real" register numbers,
159 and correspond to the general registers of the machine,
160 and some are "phony" register numbers which are too large
161 to be actual register numbers as far as the user is concerned
162 but do serve to get the desired values when passed to read_register. */
164 #define FP_REGNUM 30 /* Contains address of executing stack frame */
165 #define RP_REGNUM 15 /* Contains return address value, *before* \
166 any windows get switched. */
167 #define SP_REGNUM 14 /* Contains address of top of stack, \
168 which is also the bottom of the frame. */
169 #define Y_REGNUM 64 /* Temp register for multiplication, etc. */
170 #define PS_REGNUM 65 /* Contains processor status */
171 #define PC_REGNUM 68 /* Contains program counter */
172 #define NPC_REGNUM 69 /* Contains next PC */
173 #define FP0_REGNUM 32 /* Floating point register 0 */
174 #define FPS_REGNUM 70 /* Floating point status register */
175 #define CPS_REGNUM 71 /* Coprocessor status register */
177 /* Total amount of space needed to store our copies of the machine's
178 register state, the array `registers'. */
179 #define REGISTER_BYTES (32*4+32*4+8*4)
181 /* Index within `registers' of the first byte of the space for
184 #define REGISTER_BYTE(N) ((N)*4)
186 /* The SPARC processor has register windows. */
188 #define HAVE_REGISTER_WINDOWS
190 /* Is this register part of the register window system? A yes answer
191 implies that 1) The name of this register will not be the same in
192 other frames, and 2) This register is automatically "saved" (out
193 registers shifting into ins counts) upon subroutine calls and thus
194 there is no need to search more than one stack frame for it. */
196 #define REGISTER_IN_WINDOW_P(regnum) \
197 ((regnum) >= 8 && (regnum) < 32)
199 /* Number of bytes of storage in the actual machine representation
202 /* On the SPARC, all regs are 4 bytes. */
204 #define REGISTER_RAW_SIZE(N) (4)
206 /* Number of bytes of storage in the program's representation
209 /* On the SPARC, all regs are 4 bytes. */
211 #define REGISTER_VIRTUAL_SIZE(N) (4)
213 /* Largest value REGISTER_RAW_SIZE can have. */
215 #define MAX_REGISTER_RAW_SIZE 8
217 /* Largest value REGISTER_VIRTUAL_SIZE can have. */
219 #define MAX_REGISTER_VIRTUAL_SIZE 8
221 /* Nonzero if register N requires conversion
222 from raw format to virtual format. */
224 #define REGISTER_CONVERTIBLE(N) (0)
226 /* Convert data from raw format for register REGNUM
227 to virtual format for register REGNUM. */
229 #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
230 { bcopy ((FROM), (TO), 4); }
232 /* Convert data from virtual format for register REGNUM
233 to raw format for register REGNUM. */
235 #define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
236 { bcopy ((FROM), (TO), 4); }
238 /* Return the GDB type object for the "standard" data type
239 of data in register N. */
241 #define REGISTER_VIRTUAL_TYPE(N) \
242 ((N) < 32 ? builtin_type_int : (N) < 64 ? builtin_type_float : \
245 /* Store the address of the place in which to copy the structure the
246 subroutine will return. This is called from call_function. */
248 #define STORE_STRUCT_RETURN(ADDR, SP) \
249 { write_memory ((SP)+(16*4), &(ADDR), 4); }
251 /* Extract from an array REGBUF containing the (raw) register state
252 a function return value of type TYPE, and copy that, in virtual format,
255 #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
257 if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
259 bcopy (((int *)(REGBUF))+FP0_REGNUM, \
260 (VALBUF), TYPE_LENGTH(TYPE)); \
263 bcopy (((int *)(REGBUF))+8, (VALBUF), TYPE_LENGTH (TYPE)); \
266 /* Write into appropriate registers a function return value
267 of type TYPE, given in virtual format. */
268 /* On sparc, values are returned in register %o0. */
269 #define STORE_RETURN_VALUE(TYPE,VALBUF) \
271 if (TYPE_CODE (TYPE) = TYPE_CODE_FLT) \
272 /* Floating-point values are returned in the register pair */ \
273 /* formed by %f0 and %f1 (doubles are, anyway). */ \
274 write_register_bytes (REGISTER_BYTE (FP0_REGNUM), (VALBUF), \
275 TYPE_LENGTH (TYPE)); \
277 /* Other values are returned in register %o0. */ \
278 write_register_bytes (REGISTER_BYTE (8), VALBUF, TYPE_LENGTH (TYPE)); \
281 /* Extract from an array REGBUF containing the (raw) register state
282 the address in which a function should return its structure value,
283 as a CORE_ADDR (or an expression that can be used as one). */
285 #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
286 (read_memory_integer (((int *)(REGBUF))[SP_REGNUM]+(16*4), 4))
288 /* Enable use of alternate code to read and write registers. */
290 #define NEW_SUN_PTRACE
292 /* Enable use of alternate code for Sun's format of core dump file. */
296 /* Do implement the attach and detach commands. */
298 #define ATTACH_DETACH
301 /* Describe the pointer in each stack frame to the previous stack frame
303 #include <machine/reg.h>
305 #define GET_RWINDOW_REG(FRAME, REG) \
306 (read_memory_integer (&((struct rwindow *)FRAME)->REG, 4))
308 /* FRAME_CHAIN takes a frame's nominal address
309 and produces the frame's chain-pointer.
311 FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
312 and produces the nominal address of the caller frame.
314 However, if FRAME_CHAIN_VALID returns zero,
315 it means the given frame is the outermost one and has no caller.
316 In that case, FRAME_CHAIN_COMBINE is not used. */
318 /* In the case of the Sun 4, the frame-chain's nominal address
319 is held in the frame pointer register.
321 On the Sun4, the frame (in %fp) is %sp for the previous frame.
322 From the previous frame's %sp, we can find the previous frame's
323 %fp: it is in the save area just above the previous frame's %sp.
325 If we are setting up an arbitrary frame, we'll need to know where
326 it ends. Hence the following. This part of the frame cache
327 structure should be checked before it is assumed that this frame's
328 bottom is in the stack pointer.
330 If there isn't a frame below this one, the bottom of this frame is
331 in the stack pointer.
333 If there is a frame below this one, and the frame pointers are
334 identical, it's a leaf frame and the bottoms are the same also.
336 Otherwise the bottom of this frame is the top of the next frame. */
338 #define EXTRA_FRAME_INFO FRAME_ADDR bottom;
339 #define INIT_EXTRA_FRAME_INFO(fci) \
342 ((fci)->frame == (fci)->next_frame ? \
343 (fci)->next->bottom : (fci)->next->frame) : \
344 read_register (SP_REGNUM));
346 #define FRAME_CHAIN(thisframe) \
347 GET_RWINDOW_REG ((thisframe)->frame, rw_in[6])
349 #define FRAME_CHAIN_VALID(chain, thisframe) \
350 (chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
352 #define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
354 /* Define other aspects of the stack frame. */
356 /* A macro that tells us whether the function invocation represented
357 by FI does not have a frame on the stack associated with it. If it
358 does not, FRAMELESS is set to 1, else 0. */
359 #define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
360 FRAMELESS_LOOK_FOR_PROLOGUE(FI, FRAMELESS)
362 /* Where is the PC for a specific frame */
364 #define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
366 /* If the argument is on the stack, it will be here. */
367 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
369 #define FRAME_STRUCT_ARGS_ADDRESS(fi) ((fi)->frame)
371 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
373 /* Set VAL to the number of args passed to frame described by FI.
374 Can set VAL to -1, meaning no way to tell. */
376 /* We can't tell how many args there are
377 now that the C compiler delays popping them. */
378 #define FRAME_NUM_ARGS(val,fi) (val = -1)
380 /* Return number of bytes at start of arglist that are not really args. */
382 #define FRAME_ARGS_SKIP 68
384 /* Put here the code to store, into a struct frame_saved_regs,
385 the addresses of the saved registers of frame described by FRAME_INFO.
386 This includes special registers such as pc and fp saved in special
387 ways in the stack frame. sp is even more special:
388 the address we return for it IS the sp for the next frame.
390 Note that on register window machines, we are currently making the
391 assumption that window registers are being saved somewhere in the
392 frame in which they are being used. If they are stored in an
393 inferior frame, find_saved_register will break.
395 On the Sun 4, the only time all registers are saved is when
396 a dummy frame is involved. Otherwise, the only saved registers
397 are the LOCAL and IN registers which are saved as a result
398 of the "save/restore" opcodes. This condition is determined
399 by address rather than by value. */
401 #define FRAME_FIND_SAVED_REGS(fi, frame_saved_regs) \
402 { register int regnum; \
403 register CORE_ADDR pc; \
404 FRAME_ADDR frame = read_register (FP_REGNUM); \
405 FRAME fid = FRAME_INFO_ID (fi); \
406 if (!fid) fatal ("Bad frame info struct in FRAME_FIND_SAVED_REGS"); \
407 bzero (&(frame_saved_regs), sizeof (frame_saved_regs)); \
409 if ((fi)->pc >= frame - CALL_DUMMY_LENGTH - 0x140 \
410 && (fi)->pc <= frame) */ \
411 if ((fi)->pc >= ((fi)->bottom ? (fi)->bottom : \
412 read_register (SP_REGNUM)) \
413 && (fi)->pc <= FRAME_FP(fi)) \
415 for (regnum = 1; regnum < 8; regnum++) \
416 (frame_saved_regs).regs[regnum] = \
417 frame + regnum * 4 - 0xa0; \
418 for (regnum = 24; regnum < 32; regnum++) \
419 (frame_saved_regs).regs[regnum] = \
420 frame + (regnum - 24) * 4 - 0xc0; \
421 for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 32; regnum++) \
422 (frame_saved_regs).regs[regnum] = \
423 frame + (regnum - FP0_REGNUM) * 4 - 0x80; \
424 for (regnum = 64; regnum < NUM_REGS; regnum++) \
425 (frame_saved_regs).regs[regnum] = \
426 frame + (regnum - 64) * 4 - 0xe0; \
427 frame = (fi)->bottom ? \
428 (fi)->bottom : read_register (SP_REGNUM); \
432 frame = (fi)->bottom ? \
433 (fi)->bottom : read_register (SP_REGNUM); \
434 for (regnum = 16; regnum < 32; regnum++) \
435 (frame_saved_regs).regs[regnum] = frame + (regnum-16) * 4; \
439 /* Pull off either the next frame pointer or \
440 the stack pointer */ \
441 FRAME_ADDR next_next_frame = \
442 ((fi)->next->bottom ? \
443 (fi)->next->bottom : \
444 read_register (SP_REGNUM)); \
445 for (regnum = 8; regnum < 16; regnum++) \
446 (frame_saved_regs).regs[regnum] = next_next_frame + regnum * 4; \
448 /* Otherwise, whatever we would get from ptrace(GETREGS) */ \
450 for (regnum = 30; regnum < 32; regnum++) \
451 (frame_saved_regs).regs[regnum] = frame + (regnum-16) * 4; \
452 (frame_saved_regs).regs[SP_REGNUM] = FRAME_FP (fi); \
453 (frame_saved_regs).regs[PC_REGNUM] = frame + 15*4; \
456 /* Things needed for making the inferior call functions. */
458 * First of all, let me give my opinion of what the DUMMY_FRAME
459 * actually looks like.
463 * + - - - - - - - - - - - - - - - - +<-- fp (level 0)
468 * | Frame of innermost program |
475 * |---------------------------------|<-- sp (level 0), fp (c)
479 * | ------ |<-- fp - 0x80
480 * FRAME | g0-7 |<-- fp - 0xa0
481 * | i0-7 |<-- fp - 0xc0
482 * | other |<-- fp - 0xe0
485 * |---------------------------------|<-- sp' = fp - 0x140
488 * sp' + 0x94 -->| CALL_DUMMY (x code) |
491 * |---------------------------------|<-- sp'' = fp - 0x200
492 * | align sp to 8 byte boundary |
493 * | ==> args to fn <== |
495 * i & l's + agg | CALL_DUMMY_STACK_ADJUST = 0x0x44|
496 * |---------------------------------|<-- final sp (variable)
498 * | Where function called will |
503 * I understand everything in this picture except what the space
504 * between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
505 * understand why there's a large chunk of CALL_DUMMY that never gets
506 * executed (its function is superceeded by PUSH_DUMMY_FRAME; they
507 * are designed to do the same thing).
509 * PUSH_DUMMY_FRAME saves the registers above sp' and pushes the
510 * register file stack down one.
512 * call_function then writes CALL_DUMMY, pushes the args onto the
513 * stack, and adjusts the stack pointer.
515 * run_stack_dummy then starts execution (in the middle of
516 * CALL_DUMMY, as directed by call_function).
519 /* Push an empty stack frame, to record the current PC, etc. */
521 /* Note: to be perfectly correct, we have to restore the
522 IN registers (which were the OUT registers of the calling frame). */
523 /* Note that the write's are of registers in the context of the newly
524 pushed frame. Thus the the fp*'s, the g*'s, the i*'s, and
525 the others, of the new frame, are being saved.
526 The locals are new; they don't need to be saved. The i's and l's of
527 the last frame were saved by the do_save_insn in the register
528 file (ie. on the stack, since a context switch happended imm after) */
529 /* We note that the return pointer register does not *need* to have
530 the pc saved into it (return from this frame will be accomplished
531 by a POP_FRAME), however, just in case it might be needed, we will
532 leave it. However, we will write the original value of RP into the
533 location on the stack for saving i7 (what rp turns into upon call);
534 this way we don't loose the value with our function call. */
535 /* Note that the pc saved must be 8 less than the actual pc, since
536 both POP_FRAME and the normal return sequence on the sparc return
537 to 8 more than the value of RP_REGNUM */
539 #define PUSH_DUMMY_FRAME \
540 { extern char registers[]; \
541 register int regnum; \
542 CORE_ADDR fp = read_register (FP_REGNUM); \
543 CORE_ADDR pc = read_register (PC_REGNUM) - 8; \
544 CORE_ADDR rp = read_register (RP_REGNUM); \
545 void do_save_insn (); \
546 supply_register (RP_REGNUM, &pc); \
547 do_save_insn (0x140); \
548 fp = read_register (FP_REGNUM); \
549 write_memory (fp - 0x80, ®isters[REGISTER_BYTE (FP0_REGNUM)], 32 * 4);\
550 write_memory (fp - 0xa0, ®isters[REGISTER_BYTE (0)], 8 * 4); \
551 write_memory (fp - 0xc0, ®isters[REGISTER_BYTE (24)], 7 * 4); \
552 write_memory (fp - 0xa4, &rp, 4); \
553 write_memory (fp - 0xe0, ®isters[REGISTER_BYTE (64)], 8 * 4); \
556 /* Discard from the stack the innermost frame,
557 restoring all saved registers.
558 Note that the values stored in fsr by get_frame_saved_regs are *in
559 the context of the inferior frame*. What this means is that the i
560 regs of fsr must be restored into the o regs of the frame popped
561 into. We don't care about the output regs of the inferior frame.
563 This is true for dummy frames. Is it true for normal frames? It
564 really does appear so. */
567 { register FRAME frame = get_current_frame (); \
568 register CORE_ADDR fp; \
569 register CORE_ADDR pc; \
570 register int regnum; \
571 struct frame_saved_regs fsr; \
572 struct frame_info *fi; \
573 char raw_buffer[REGISTER_BYTES]; \
574 void do_restore_insn (); \
575 fi = get_frame_info (frame); \
577 get_frame_saved_regs (fi, &fsr); \
578 pc = read_memory_integer (fsr.regs[PC_REGNUM], 4); \
579 do_restore_insn (PC_ADJUST (pc)); \
580 if (fsr.regs[FP0_REGNUM]) \
582 read_memory (fsr.regs[FP0_REGNUM], raw_buffer, 32 * 4); \
583 write_register_bytes (REGISTER_BYTE (FP0_REGNUM), raw_buffer, 32 * 4); \
587 read_memory (fsr.regs[1], raw_buffer, 7 * 4); \
588 write_register_bytes (REGISTER_BYTE (1), raw_buffer, 7 * 4); \
592 read_memory (fsr.regs[24], raw_buffer, 8 * 4); \
593 write_register_bytes (REGISTER_BYTE (8), raw_buffer, 8 * 4); \
595 if (fsr.regs[PS_REGNUM]) \
596 write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4)); \
597 if (fsr.regs[Y_REGNUM]) \
598 write_register (Y_REGNUM, read_memory_integer (fsr.regs[Y_REGNUM], 4)); \
599 if (fsr.regs[NPC_REGNUM]) \
600 write_register (NPC_REGNUM, read_memory_integer (fsr.regs[NPC_REGNUM], 4)); \
601 flush_cached_frames (); \
602 set_current_frame ( create_new_frame (read_register (FP_REGNUM), \
605 /* This sequence of words is the instructions
632 nop ! stcsr [%fp-0xc4]
633 nop ! stfsr [%fp-0xc8]
634 nop ! wr %npc,[%fp-0xcc]
635 nop ! wr %pc,[%fp-0xd0]
645 /..* The arguments are pushed at this point by GDB;
646 no code is needed in the dummy for this.
647 The CALL_DUMMY_START_OFFSET gives the position of
648 the following ld instruction. *../
661 note that this is 192 bytes, which is a multiple of 8 (not only 4) bytes.
662 note that the `call' insn is a relative, not an absolute call.
663 note that the `nop' at the end is needed to keep the trap from
664 clobbering things (if NPC pointed to garbage instead).
666 We actually start executing at the `sethi', since the pushing of the
667 registers (as arguments) is done by PUSH_DUMMY_FRAME. If this were
668 real code, the arguments for the function called by the CALL would be
669 pushed between the list of ST insns and the CALL, and we could allow
670 it to execute through. But the arguments have to be pushed by GDB
671 after the PUSH_DUMMY_FRAME is done, and we cannot allow these ST
672 insns to be performed again, lest the registers saved be taken for
675 #define CALL_DUMMY { 0x9de3bee0, 0xfd3fbff8, 0xf93fbff0, 0xf53fbfe8, \
676 0xf13fbfe0, 0xed3fbfd8, 0xe93fbfd0, 0xe53fbfc8, \
677 0xe13fbfc0, 0xdd3fbfb8, 0xd93fbfb0, 0xd53fbfa8, \
678 0xd13fbfa0, 0xcd3fbf98, 0xc93fbf90, 0xc53fbf88, \
679 0xc13fbf80, 0xcc3fbf78, 0xc83fbf70, 0xc43fbf68, \
680 0xc03fbf60, 0xfc3fbf58, 0xf83fbf50, 0xf43fbf48, \
681 0xf03fbf40, 0x01000000, 0x01000000, 0x01000000, \
682 0x01000000, 0x91580000, 0xd027bf50, 0x93500000, \
683 0xd027bf4c, 0x91480000, 0xd027bf48, 0x91400000, \
684 0xd027bf44, 0xda03a058, 0xd803a054, 0xd603a050, \
685 0xd403a04c, 0xd203a048, 0x40000000, 0xd003a044, \
686 0x01000000, 0x91d02001, 0x01000000, 0x01000000}
688 #define CALL_DUMMY_LENGTH 192
690 #define CALL_DUMMY_START_OFFSET 148
692 #define CALL_DUMMY_STACK_ADJUST 68
694 /* Insert the specified number of args and function address
695 into a call sequence of the above form stored at DUMMYNAME. */
697 #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, type) \
699 *(int *)((char *) dummyname+168) = (0x40000000|((fun-(pc+168))>>2)); \
700 if (TYPE_CODE (type) == TYPE_CODE_STRUCT \
701 || TYPE_CODE (type) == TYPE_CODE_UNION) \
702 *(int *)((char *) dummyname+176) = (TYPE_LENGTH (type) & 0x1fff); \
706 /* Sparc has no reliable single step ptrace call */
708 #define NO_SINGLE_STEP 1
710 /* It does have a wait structure, and it might help things out . . . */
712 #define HAVE_WAIT_STRUCT
714 /* Handle a feature in the sun4 compiler ("call .stret4" at the end of
715 functions returning structures). */
717 #define SUN4_COMPILER_FEATURE
719 /* We need two arguments (in general) to the "info frame" command.
720 Note that the definition of this macro implies that there exists a
721 function "setup_arbitrary_frame" in mach-dep.c */
723 #define FRAME_SPECIFICATION_DYADIC
725 /* KDB stuff flushed for now. */
This page took 0.044413 seconds and 4 git commands to generate.