| 1 | comptime { |
| 2 | asm volatile (""); |
| 3 | } |
| 4 | comptime { |
| 5 | asm ("" |
| 6 | : [_] "" (-> u8), |
| 7 | ); |
| 8 | } |
| 9 | comptime { |
| 10 | asm ("" |
| 11 | : |
| 12 | : [_] "" (0), |
| 13 | ); |
| 14 | } |
| 15 | comptime { |
| 16 | asm ("" ::: .{}); |
| 17 | } |
| 18 | export fn a() void { |
| 19 | asm (""); |
| 20 | } |
| 21 | export fn b() void { |
| 22 | asm ("" |
| 23 | : [_] "" (-> u8), |
| 24 | [_] "" (-> u8), |
| 25 | ); |
| 26 | } |
| 27 | export fn c() void { |
| 28 | var out: u8 = 0; |
| 29 | asm ("" |
| 30 | : [_] "" (out), |
| 31 | [_] "" (out), |
| 32 | [_] "" (out), |
| 33 | [_] "" (out), |
| 34 | [_] "" (out), |
| 35 | [_] "" (out), |
| 36 | [_] "" (out), |
| 37 | [_] "" (out), |
| 38 | [_] "" (out), |
| 39 | [_] "" (out), |
| 40 | [_] "" (out), |
| 41 | [_] "" (out), |
| 42 | [_] "" (out), |
| 43 | [_] "" (out), |
| 44 | [_] "" (out), |
| 45 | [_] "" (out), |
| 46 | [_] "" (out), |
| 47 | ); |
| 48 | } |
| 49 | export fn d() void { |
| 50 | asm volatile ("" |
| 51 | : |
| 52 | : [_] "" (0), |
| 53 | [_] "" (0), |
| 54 | [_] "" (0), |
| 55 | [_] "" (0), |
| 56 | [_] "" (0), |
| 57 | [_] "" (0), |
| 58 | [_] "" (0), |
| 59 | [_] "" (0), |
| 60 | [_] "" (0), |
| 61 | [_] "" (0), |
| 62 | [_] "" (0), |
| 63 | [_] "" (0), |
| 64 | [_] "" (0), |
| 65 | [_] "" (0), |
| 66 | [_] "" (0), |
| 67 | [_] "" (0), |
| 68 | [_] "" (0), |
| 69 | [_] "" (0), |
| 70 | [_] "" (0), |
| 71 | [_] "" (0), |
| 72 | [_] "" (0), |
| 73 | [_] "" (0), |
| 74 | [_] "" (0), |
| 75 | [_] "" (0), |
| 76 | [_] "" (0), |
| 77 | [_] "" (0), |
| 78 | [_] "" (0), |
| 79 | [_] "" (0), |
| 80 | [_] "" (0), |
| 81 | [_] "" (0), |
| 82 | [_] "" (0), |
| 83 | [_] "" (0), |
| 84 | [_] "" (0), |
| 85 | ); |
| 86 | } |
| 87 | |
| 88 | // error |
| 89 | // |
| 90 | // :2:9: error: volatile is meaningless on global assembly |
| 91 | // :5:5: error: global assembly cannot have inputs, outputs, or clobbers |
| 92 | // :10:5: error: global assembly cannot have inputs, outputs, or clobbers |
| 93 | // :16:5: error: global assembly cannot have inputs, outputs, or clobbers |
| 94 | // :19:5: error: assembly expression with no output must be marked volatile |
| 95 | // :24:12: error: inline assembly allows up to one output value |
| 96 | // :46:12: error: too many asm outputs |
| 97 | // :84:12: error: too many asm inputs |