Paste: zero overhead with -no-exceptions

Author: kssreeram
Mode: text
Date: Thu, 19 Aug 2010 18:29:18
Plain Text |
test/libchello.clay :

import libc;

main() {
    libc.printf(cstring("Hello!\n"));
}


$ clay -asm -no-exceptions test/libchello.clay
$ cat libchello.s

	.section	__TEXT,__text,regular,pure_instructions
	.align	4, 0x90
"_clay_%destroyGlobals":                ## @"clay_%destroyGlobals"
## BB#0:                                ## %init
	ret

	.globl	_main
	.align	4, 0x90
_main:                                  ## @main
## BB#0:                                ## %init
	subq	$8, %rsp
	leaq	_str(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	addq	$8, %rsp
	ret

	.section	__DATA,__mod_init_func,mod_init_funcs
	.align	3
	.section	__DATA,__mod_term_func,mod_term_funcs
	.align	3
	.quad	"_clay_%destroyGlobals"
	.section	__TEXT,__cstring,cstring_literals
_str:                                   ## @str
	.asciz	 "Hello!"


.subsections_via_symbols

New Annotation

Summary:
Author:
Mode:
Body: