Mercurial > emacs
comparison src/alloca.s @ 49600:23a1cea22d13
Trailing whitespace deleted.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 04 Feb 2003 14:56:31 +0000 |
parents | 6e7bb4bd5010 |
children |
comparison
equal
deleted
inserted
replaced
49599:5ade352e8d1c | 49600:23a1cea22d13 |
---|---|
57 #ifdef hp9000s300 | 57 #ifdef hp9000s300 |
58 #ifdef OLD_HP_ASSEMBLER | 58 #ifdef OLD_HP_ASSEMBLER |
59 data | 59 data |
60 text | 60 text |
61 globl _alloca | 61 globl _alloca |
62 _alloca | 62 _alloca |
63 move.l (sp)+,a0 ; pop return addr from top of stack | 63 move.l (sp)+,a0 ; pop return addr from top of stack |
64 move.l (sp)+,d0 ; pop size in bytes from top of stack | 64 move.l (sp)+,d0 ; pop size in bytes from top of stack |
65 add.l #ROUND,d0 ; round size up to long word | 65 add.l #ROUND,d0 ; round size up to long word |
66 and.l #MASK,d0 ; mask out lower two bits of size | 66 and.l #MASK,d0 ; mask out lower two bits of size |
67 sub.l d0,sp ; allocate by moving stack pointer | 67 sub.l d0,sp ; allocate by moving stack pointer |
110 file "alloca.s" | 110 file "alloca.s" |
111 global alloca | 111 global alloca |
112 alloca: | 112 alloca: |
113 #ifdef MOTOROLA_DELTA | 113 #ifdef MOTOROLA_DELTA |
114 /* slightly modified version of alloca to motorola sysV/68 pcc - based | 114 /* slightly modified version of alloca to motorola sysV/68 pcc - based |
115 compiler. | 115 compiler. |
116 this compiler saves used registers relative to %sp instead of %fp. | 116 this compiler saves used registers relative to %sp instead of %fp. |
117 alright, just make new copy of saved register set whenever we allocate | 117 alright, just make new copy of saved register set whenever we allocate |
118 new space from stack.. | 118 new space from stack.. |
119 this is true at last until SVR3V7 . bug has reported to Motorola. */ | 119 this is true at last until SVR3V7 . bug has reported to Motorola. */ |
120 set MAXREG,10 # max no of registers to save (d2-d7, a2-a5) | 120 set MAXREG,10 # max no of registers to save (d2-d7, a2-a5) |
249 * The ns16000 is a little more difficult, need to copy regs. | 249 * The ns16000 is a little more difficult, need to copy regs. |
250 * Also the code assumes direct linkage call sequence (no mod table crap). | 250 * Also the code assumes direct linkage call sequence (no mod table crap). |
251 * We have to copy registers, and therefore waste 32 bytes. | 251 * We have to copy registers, and therefore waste 32 bytes. |
252 * | 252 * |
253 * Stack layout: | 253 * Stack layout: |
254 * new sp -> junk | 254 * new sp -> junk |
255 * registers (copy) | 255 * registers (copy) |
256 * r0 -> new data | 256 * r0 -> new data |
257 * | (orig retval) | 257 * | (orig retval) |
258 * | (orig arg) | 258 * | (orig arg) |
259 * old sp -> regs (orig) | 259 * old sp -> regs (orig) |
260 * local data | 260 * local data |
261 * fp -> old fp | 261 * fp -> old fp |