Home | History | Annotate | Download | only in WebAssembly
      1 ; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
      2 
      3 target triple = "wasm32-unknown-unknown"
      4 
      5 ; CHECK:        - Type:            CODE
      6 ; CHECK-NEXT:     Functions:
      7 ; CHECK-NEXT:       - Index:           0
      8 ; CHECK-NEXT:         Locals:
      9 ; CHECK-NEXT:         Body:            41002802FFFFFFFF0F0B
     10 define i32 @load_i32_from_negative_address() {
     11   %t = load i32, i32* inttoptr (i32 -1 to i32*)
     12   ret i32 %t
     13 }
     14 
     15 ; CHECK-NEXT:       - Index:           1
     16 ; CHECK-NEXT:         Locals:          
     17 ; CHECK-NEXT:         Body:            41002802030B
     18 define i32 @load_i32_from_wrapped_address() {
     19   %t = load i32, i32* inttoptr (i32 4294967299 to i32*)
     20   ret i32 %t
     21 }
     22