6 ms·
Does a recording of this talk exist? Ran `go run .` and it ended with: [...] go: downloading github.com/mewmew/float v0.0.0-20181121163145-c0f786d7da73
by rawland 8y ago
Does a recording of this talk exist?
Ran `go run .` and it ended with:
[...]
go: downloading github.com/mewmew/float v0.0.0-20181121163145-c0f786d7da73
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/rickypai/natsort v0.0.0-20180124032556-f194e6bd5b0c
@$const_str = global [16 x i8] c"Hello world %d\0A\00"
declare void @printf(...)
define void @main() {
0:
%0 = add i64 30, 12
call void (...) @printf([16 x i8]* @$const_str, i64 %0)
ret void
}
0>
- richardjennings 8y agoThe make file provides some additional utility https://github.com/pwaller/go2ll-talk/blob/master/Makefile https://github.com/pwaller/go2ll-talk/blob/master/Makefile
- peterwaller 8y agoUnfortunately there isn't a recording, sorry! What you're seeing is the LLVM IR for the program being printed. As another commenter noted, you can compile the program with make, which just runs `clang` on that IR.
- loeg 8y agoMinor nitpick: "%d" format string for i64 isn't quite right on most (all?) platforms.
- pstuart 8y agoHow so?
- loeg 8y ago%d is for regular 'int' sized arguments. Most popular platforms have a 32-bit or smaller 'int'. i64 refers to a 64-bit int. For that you would use '%ld' or '%lld' depending on if long or long long was 64-bit. (Or '"%" PRId64' if you really like the inttypes.h syntax.)
- peterwaller 8y agoThanks for pointing this out, I fixed it.