Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 1 | |
| 2 | %MyVar = global int 4 |
| 3 | %MyIntList = uninitialized global { \2 *, int } |
| 4 | |
| 5 | %AConst = constant int 123 |
| 6 | |
Chris Lattner | 230e5ef | 2001-10-15 03:11:58 +0000 | [diff] [blame^] | 7 | %MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList } |
| 8 | %MyVarPtr = global { int * } { int * %MyVar } |
| 9 | |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 10 | constant int 412 |
| 11 | |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 12 | implementation |
| 13 | |
| 14 | int "foo"(int %blah) |
| 15 | begin |
| 16 | store int %blah, int *%MyVar |
| 17 | store int 12, { \2 *, int } * %MyIntList, ubyte 1 |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 18 | |
Chris Lattner | 230e5ef | 2001-10-15 03:11:58 +0000 | [diff] [blame^] | 19 | %ack = load int * %0 ;; Load from the unnamed constant |
| 20 | %fzo = add int %ack, %blah |
| 21 | ret int %fzo |
Chris Lattner | 285c68d | 2001-10-13 07:15:38 +0000 | [diff] [blame] | 22 | end |
| 23 | |
Chris Lattner | 784c52f | 2001-10-14 23:28:56 +0000 | [diff] [blame] | 24 | declare void "unimp"(float, double) |