m4@UX.ACSS.UMN.EDU (12/05/89)
On a Sun3, using gcc version 1.36, notice the generated "movel d0,sp"!!! gcc -ffixed-a2 -ffixed-a3 -ffixed-a4 -ffixed-a5 -ffixed-d3 -S A.c ------ file A.c ------ typedef unsigned char u_char; typedef char *va_list; # define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1] extern struct _iobuf { int _cnt; unsigned char *_ptr; unsigned char *_base; int _bufsiz; short _flag; char _file; } _iob[]; _doprnt(fmt0, argp, fp) u_char *fmt0; va_list argp; struct _iobuf *fp; { double _double; _double = va_arg(argp, double); _double = -_double; } ------ file A.s -------- #NO_APP gcc_compiled.: .text .even .globl __doprnt __doprnt: link a6,#-12 movel a6@(12),d0 addql #8,d0 movel d0,a6@(-12) movel a6@(-12),a6@(12) movel d0,sp | WOW!!!!! movel sp@(-8),a0 movel sp@(-4),a1 movel a0,a6@(-8) movel a1,a6@(-4) movel #___negdf2,d0 movel a6@(-4),sp@- movel a6@(-8),sp@- jbsr ___negdf2 addqw #8,sp movel d0,d0 movel d1,d1 movel d0,a6@(-8) movel d1,a6@(-4) L1: unlk a6 rts