icky C code

Jon Loeliger jdl at purdue.UUCP
Thu Jul 31 02:56:59 AEST 1986


In article <3117 at utcsri.UUCP>, greg at utcsri.UUCP (Gregory Smith) writes:
> From a code efficiency
> standpoint, for example, a 68000 should return int's in D0 and all pointer
> types in A0, which would break the above. ( Somebody pointed out that a
> certain 68K compiler has an option to return both types in *both* regs ).
> Or am I wrong, and there is a non-unwritten ( i.e. official ) rule that
> says everything should return in the same reg whenever possible?


I am in the process of writing a 68000 backend and just
this problem arose.  As of now, I resolved it by postponing
the critical decision, and left everything in D0 upon return.
------------------------------------------------------------------------------
Jon Loeliger		I *think* these are my opinions, let me ask my boss...
jdl at Purdue.ARPA					Dept Computer Science
jdl at Purdue.Edu					W. Lafayette, IN 47907
jdl at mordred.cs.purdue.edu			(317) 494-6180
{ihnp4, decvax, ucbvax, pur-ee}!purdue!jdl
-- 
------------------------------------------------------------------------------
Jon Loeliger		I *think* these are my opinions, let me ask my boss...

jdl at Purdue.ARPA					Dept Computer Science
jdl at Purdue.Edu					W. Lafayette, IN 47907
jdl at mordred.cs.purdue.edu			(317) 494-6180
{ihnp4, decvax, ucbvax, pur-ee}!purdue!jdl



More information about the Comp.lang.c mailing list