brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 5129ff4 Raw
28 lines · plain
1RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.o2 3; The initial heap size will be added to the stack size4RUN: wasm-ld %t.o -o %t1.wasm --stack-first -z stack-size=65536 --initial-heap=1310725RUN: obj2yaml %t1.wasm | FileCheck %s --check-prefixes=CHECK,CHECK-2P6 7; Also test that we can parse and process a large size correctly8RUN: wasm-ld %t.o -o %t2.wasm --stack-first -z stack-size=65536 --initial-heap=42949017609RUN: obj2yaml %t2.wasm | FileCheck %s --check-prefixes=CHECK,CHECK-4G10 11CHECK:      - Type:            MEMORY12CHECK-NEXT:   Memories:13CHECK-2P-NEXT:    Minimum:         0x314CHECK-4G-NEXT:    Minimum:         0x1000015 16; Test various error cases.17RUN: not wasm-ld %t.o -o %t3.wasm --initial-heap=131073 2>&1 | FileCheck %s --check-prefix NOT-PAGE-MULTIPLE18RUN: not wasm-ld %t.o -o %t4.wasm --stack-first -z stack-size=65536 --initial-heap=4295032832 2>&1 | FileCheck %s --check-prefix TOO-LARGE-BY-ITSELF19RUN: not wasm-ld %t.o -o %t5.wasm --stack-first -z stack-size=131072 --initial-heap=4294901760 2>&1 | FileCheck %s --check-prefix TOO-LARGE-WITH-STACK20RUN: not wasm-ld %t.o -o %t6.wasm --stack-first -z stack-size=65536 --initial-heap=131072 --initial-memory=131072 2>&1 | FileCheck %s --check-prefix INITIAL-MEMORY-TOO-SMALL21RUN: not wasm-ld %t.o -o %t7.wasm --stack-first -z stack-size=65536 --initial-heap=131072 --max-memory=131072 2>&1 | FileCheck %s --check-prefix MAX-MEMORY-TOO-SMALL22 23NOT-PAGE-MULTIPLE: initial heap must be aligned to the page size (65536 bytes)24TOO-LARGE-BY-ITSELF: initial heap too large, cannot be greater than 429490176025TOO-LARGE-WITH-STACK: initial heap too large, cannot be greater than 429483622426INITIAL-MEMORY-TOO-SMALL: initial memory too small, 196608 bytes needed27MAX-MEMORY-TOO-SMALL: maximum memory too small, 196608 bytes needed28