brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · a2888c6 Raw
25 lines · plain
1RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.o2 3; Verify we can parse large integers such as when we ask for 2G of total4; memory.5RUN: wasm-ld %t.o -o %t1.wasm --max-memory=21474836486RUN: obj2yaml %t1.wasm | FileCheck %s --check-prefixes=CHECK,CHECK-2G7 8; And also 4G of total memory9RUN: wasm-ld %t.o -o %t2.wasm --max-memory=429496729610RUN: obj2yaml %t2.wasm | FileCheck %s --check-prefixes=CHECK,CHECK-4G11 12CHECK:      - Type:            MEMORY13CHECK-NEXT:   Memories:14CHECK-NEXT:     - Flags:           [ HAS_MAX ]15CHECK-NEXT:       Minimum:         0x116CHECK-2G-NEXT:    Maximum:         0x800017CHECK-4G-NEXT:    Maximum:         0x1000018 19; Test error for more than 4G of memory20RUN: not wasm-ld %t.o -o %t3.wasm --initial-memory=4295032832 2>&1 | FileCheck %s --check-prefix INIT-ERROR21RUN: not wasm-ld %t.o -o %t4.wasm --max-memory=4295032832 2>&1 | FileCheck %s --check-prefix MAX-ERROR22 23INIT-ERROR: initial memory too large, cannot be greater than 429496729624MAX-ERROR: maximum memory too large, cannot be greater than 429496729625