* [obish/cris] Delete extract_struct_value_address
@ 2004-01-17 19:02 Andrew Cagney
2004-01-17 20:00 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2004-01-17 19:02 UTC (permalink / raw)
To: gdb-patches, orjanf
Orjan,
The attached deletes cris's implementation of
extract_struct_value_address. Knowing two things make deleting it
relatively obvious:
- infrun.c's been rewritten so that it never calls
extract_struct_value_address, hence the "trick" of saving the return
value's address in a global is never exploited
- as the comments note, the ABI doesn't preserve the return address
register and hence the other potential caller (code trying to extract
the return value) doesn't apply
BTW, suggest looking at "return_value", implementing it has a dramatic
effect on the test results from structs.exp.
enjoy, (committed)
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [obish/cris] Delete extract_struct_value_address
2004-01-17 19:02 [obish/cris] Delete extract_struct_value_address Andrew Cagney
@ 2004-01-17 20:00 ` Andrew Cagney
2004-01-18 0:02 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2004-01-17 20:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches, orjanf
[-- Attachment #1: Type: text/plain, Size: 39 bytes --]
Oops, missed this. Committed.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 852 bytes --]
2004-01-17 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (cris_gdbarch_init): Do not set
deprecated_extract_struct_value_address.
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.94
diff -u -r1.94 cris-tdep.c
--- cris-tdep.c 17 Jan 2004 18:52:33 -0000 1.94
+++ cris-tdep.c 17 Jan 2004 19:52:47 -0000
@@ -4243,8 +4243,6 @@
set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
- set_gdbarch_deprecated_extract_struct_value_address
- (gdbarch, cris_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [obish/cris] Delete extract_struct_value_address
2004-01-17 20:00 ` Andrew Cagney
@ 2004-01-18 0:02 ` Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2004-01-18 0:02 UTC (permalink / raw)
To: gdb-patches; +Cc: orjanf
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
... and incorrectly removed this function. Cris has it in for me :-/ sorry,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 977 bytes --]
2004-01-17 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (cris_store_struct_return): Put back accidently
deleted function.
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.95
diff -u -r1.95 cris-tdep.c
--- cris-tdep.c 17 Jan 2004 20:02:04 -0000 1.95
+++ cris-tdep.c 18 Jan 2004 00:00:13 -0000
@@ -1076,6 +1076,17 @@
internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large");
}
+/* Store the address of the place in which to copy the structure the
+ subroutine will return. In the CRIS ABI, R9 is used in order to
+ pass the address of the allocated area where a structure return
+ value must be stored. */
+
+static void
+cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+ write_register (STR_REGNUM, addr);
+}
+
/* Returns 1 if the given type will be passed by pointer rather than
directly. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-18 0:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-17 19:02 [obish/cris] Delete extract_struct_value_address Andrew Cagney
2004-01-17 20:00 ` Andrew Cagney
2004-01-18 0:02 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox