]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update PPC64 CALL* ops for register ABI
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 22 Sep 2021 19:05:49 +0000 (14:05 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 22 Sep 2021 22:50:41 +0000 (22:50 +0000)
Allow the CALL ops to take variable number of arguments.

Change-Id: I6753c2fcb434ce2ebbce51dd595fbcbb39a60bed
Reviewed-on: https://go-review.googlesource.com/c/go/+/351589
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>

src/cmd/compile/internal/ssa/gen/PPC64Ops.go
src/cmd/compile/internal/ssa/opGen.go

index 9d9122e148814bfe89320a3fff8adb891ff99f7f..5f84290002cc2bd3bb6b79bacd668d49e24f272e 100644 (file)
@@ -428,10 +428,10 @@ func init() {
                {name: "LoweredRound32F", argLength: 1, reg: fp11, resultInArg0: true, zeroWidth: true},
                {name: "LoweredRound64F", argLength: 1, reg: fp11, resultInArg0: true, zeroWidth: true},
 
-               {name: "CALLstatic", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                                       // call static function aux.(*obj.LSym).  arg0=mem, auxint=argsize, returns mem
-               {name: "CALLtail", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                                         // tail call static function aux.(*obj.LSym).  arg0=mem, auxint=argsize, returns mem
-               {name: "CALLclosure", argLength: 3, reg: regInfo{inputs: []regMask{callptr, ctxt, 0}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // call function via closure.  arg0=codeptr, arg1=closure, arg2=mem, auxint=argsize, returns mem
-               {name: "CALLinter", argLength: 2, reg: regInfo{inputs: []regMask{callptr}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},            // call fn by pointer.  arg0=codeptr, arg1=mem, auxint=argsize, returns mem
+               {name: "CALLstatic", argLength: -1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                                       // call static function aux.(*obj.LSym).  arg0=mem, auxint=argsize, returns mem
+               {name: "CALLtail", argLength: -1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},                                         // tail call static function aux.(*obj.LSym).  arg0=mem, auxint=argsize, returns mem
+               {name: "CALLclosure", argLength: -1, reg: regInfo{inputs: []regMask{callptr, ctxt, 0}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // call function via closure.  arg0=codeptr, arg1=closure, arg2=mem, auxint=argsize, returns mem
+               {name: "CALLinter", argLength: -1, reg: regInfo{inputs: []regMask{callptr}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true},            // call fn by pointer.  arg0=codeptr, arg1=mem, auxint=argsize, returns mem
 
                // large or unaligned zeroing
                // arg0 = address of memory to zero (in R3, changed as side effect)
index fed3bc338644d4402df4ad5b7d0826da0245b01e..32ffd28b6a3496b7044e56ab46e02dbb931d6b50 100644 (file)
@@ -27337,7 +27337,7 @@ var opcodeTable = [...]opInfo{
        {
                name:         "CALLstatic",
                auxType:      auxCallOff,
-               argLen:       1,
+               argLen:       -1,
                clobberFlags: true,
                call:         true,
                reg: regInfo{
@@ -27347,7 +27347,7 @@ var opcodeTable = [...]opInfo{
        {
                name:         "CALLtail",
                auxType:      auxCallOff,
-               argLen:       1,
+               argLen:       -1,
                clobberFlags: true,
                call:         true,
                reg: regInfo{
@@ -27357,7 +27357,7 @@ var opcodeTable = [...]opInfo{
        {
                name:         "CALLclosure",
                auxType:      auxCallOff,
-               argLen:       3,
+               argLen:       -1,
                clobberFlags: true,
                call:         true,
                reg: regInfo{
@@ -27371,7 +27371,7 @@ var opcodeTable = [...]opInfo{
        {
                name:         "CALLinter",
                auxType:      auxCallOff,
-               argLen:       2,
+               argLen:       -1,
                clobberFlags: true,
                call:         true,
                reg: regInfo{