Why in win32/lib/crt1.c the code for check success of __getmainargs was removed? I think is important check the return of that function before call to main.
Carlos Montiers A. 2016-10-03 7:48 GMT-03:00 grischka <gris...@gmx.de>: > grischka wrote: > >> Daniel Glöckner wrote: >> >>> Hi, >>> >>> On Sat, Oct 01, 2016 at 09:03:47PM +0200, grischka wrote: >>> >>>> I did push some cleanups to prepare for a release 0.9.27, >>>> eventually. Just if you wonder what's the point of that. >>>> >>> >>> I'd vote for applying Balazs' patches from August 25 ("Incorrect >>> function call code on ARMv6") before the release. Unless of course >>> someone can prove that the second patch breaks something. >>> >> >> Let's see ... : >> http://repo.or.cz/tinycc.git/commitdiff/49d3118621a68f658322 >> 8f123efd16f0f803d908 >> > > Ok, have seen it: crash in "make test". > > I did something different now. It's not nice but maybe works. > It would just run a second pass in copy_params to reload registers > that have been saved on stack by accident. > > http://repo.or.cz/tinycc.git/commitdiff/5805b07218aef3c1049b > 5db9d89841d383ee917d > > --- grischka > > test code: > unsigned int x = 0x44444444, *xx[1] = { &x }; > unsigned long long y = 0xaaaaaaaabbbbbbbb, *yy[1] = { &y }; > void foo(long long y, int x); > int main(void) > { > foo(**yy, **xx); > return 0; > } > > objdump: > 0: e1a0c00d mov ip, sp > 4: e92d5800 push {fp, ip, lr} > 8: e1a0b00d mov fp, sp > c: e24bd008 sub sp, fp, #8 > > 10: e59fe000 ldr lr, [pc] ; 18 <main+0x18> > 14: ea000000 b 1c <main+0x1c> > 18: 00000000 andeq r0, r0, r0 > 1c: e59e0000 ldr r0, [lr] > > 20: e59fe000 ldr lr, [pc] ; 28 <main+0x28> > 24: ea000000 b 2c <main+0x2c> > 28: 00000000 andeq r0, r0, r0 > > 2c: e59e1000 ldr r1, [lr] > 30: e5912000 ldr r2, [r1] <-- r2 prepared as argument > > 34: e50b2004 str r2, [fp, #-4] <-- r2 saved on stack > 38: e5901000 ldr r1, [r0] > 3c: e2800004 add r0, r0, #4 > 40: e5902000 ldr r2, [r0] > 44: e50b1008 str r1, [fp, #-8] > 48: e1a01002 mov r1, r2 > 4c: e51b0008 ldr r0, [fp, #-8] > 50: e51b2004 ldr r2, [fp, #-4] <-- reloaded in second pass > 54: ebfffffe bl 0 <foo> > 58: e3a00000 mov r0, #0 > 5c: e89ba800 ldm fp, {fp, sp, pc} > > > _______________________________________________ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel >
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel