github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/runtime/arch_xtensa.go (about)

     1  //go:build xtensa
     2  
     3  package runtime
     4  
     5  const GOARCH = "arm" // xtensa pretends to be arm
     6  
     7  // The bitness of the CPU (e.g. 8, 32, 64).
     8  const TargetBits = 32
     9  
    10  const deferExtraRegs = 0
    11  
    12  const callInstSize = 3 // "callx0 someFunction" (and similar) is 3 bytes
    13  
    14  // The largest alignment according to the Xtensa ABI is 8 (long long, double).
    15  func align(ptr uintptr) uintptr {
    16  	return (ptr + 7) &^ 7
    17  }
    18  
    19  func getCurrentStackPointer() uintptr {
    20  	return uintptr(stacksave())
    21  }