Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only include formal parameters in function for varargs call #602

Merged

Conversation

elliottslaughter
Copy link
Member

@elliottslaughter elliottslaughter commented Aug 22, 2022

Potential fix for macOS on M1: #597 (comment).

@shoe42
Copy link
Contributor

shoe42 commented Aug 23, 2022

Looks like this substantially improves the test pass rate on macOS M1 (macOS 12.5, system clang, Homebrew LLVM 13):

99% tests passed, 3 tests failed out of 550

Total Test time (real) =  16.54 sec

The following tests FAILED:
	 27 - atomicrmw.t (Subprocess aborted)
	 61 - cconv_array.t (Failed)
	534 - vararg.t (Subprocess aborted)

vararg.t still fails with Assertion failed: (Ty && "Invalid GetElementPtrInst indices for type!"), function checkGEPType, file Instructions.h, line 921., however bug372*.t seem to now pass.

@shoe42
Copy link
Contributor

shoe42 commented Aug 23, 2022

Looks like arguments are now being passed properly with the bug372 minimal address printing example:

0000000100003ec4 <_main>:
100003ec4: f4 4f be a9 	stp	x20, x19, [sp, #-32]!
100003ec8: fd 7b 01 a9 	stp	x29, x30, [sp, #16]
100003ecc: ff 43 0d d1 	sub	sp, sp, #848
100003ed0: c0 02 00 10 	adr	x0, #88
100003ed4: f3 23 00 91 	add	x19, sp, #8
100003ed8: 1f 20 03 d5 	nop
100003edc: f3 03 00 f9 	str	x19, [sp]
100003ee0: 0f 00 00 94 	bl	0x100003f1c <_printf+0x100003f1c>
100003ee4: e0 02 00 50 	adr	x0, #94
100003ee8: 68 e2 08 91 	add	x8, x19, #568
100003eec: 1f 20 03 d5 	nop
100003ef0: e8 03 00 f9 	str	x8, [sp]
100003ef4: 0a 00 00 94 	bl	0x100003f1c <_printf+0x100003f1c>
100003ef8: 20 03 00 10 	adr	x0, #100
100003efc: 68 02 7e b2 	orr	x8, x19, #0x4
100003f00: 1f 20 03 d5 	nop
100003f04: e8 03 00 f9 	str	x8, [sp]
100003f08: 05 00 00 94 	bl	0x100003f1c <_printf+0x100003f1c>
100003f0c: ff 43 0d 91 	add	sp, sp, #848
100003f10: fd 7b 41 a9 	ldp	x29, x30, [sp, #16]
100003f14: f4 4f c2 a8 	ldp	x20, x19, [sp], #32
100003f18: c0 03 5f d6 	ret

@elliottslaughter elliottslaughter merged commit 184ed6a into terralang:master Aug 23, 2022
@elliottslaughter elliottslaughter deleted the fix-printf-macos-m1 branch August 23, 2022 16:27
@elliottslaughter
Copy link
Member Author

Nice! Maybe we could split out the remaining three test failures into separate issues? For the vararg.t, it might help to get a backtrace (remember to build Terra in debug mode).

@shoe42
Copy link
Contributor

shoe42 commented Aug 23, 2022

Done - issues #603, #604 and #605.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants