Source file test/codegen/wasmjump.go

     1  // asmcheck
     2  
     3  // Copyright 2026 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package codegen
     8  
     9  // Branch directly to basic blocks located after the jump.
    10  func wasmJumpForward(x int) int {
    11  	// wasm:`Br\s` -`Set\sPC_B`
    12  	if x > 0 {
    13  		return x + 1
    14  	}
    15  	return x * 3
    16  }
    17  

View as plain text