func emitRbrac(asm *amd64.Assembler, cc *compiled) { header := cc.stack[len(cc.stack)-1] cc.stack = cc.stack[:len(cc.stack)-1] asm.JmpRel(gojit.Addr(asm.Buf[header:])) end := asm.Off asm.Off = header asm.Testb(amd64.Imm{0xff}, amd64.Indirect{amd64.Rax, 0, 8}) asm.JccRel(amd64.CC_Z, gojit.Addr(asm.Buf[end:])) asm.Off = end }
func emitLbrac(asm *amd64.Assembler, cc *compiled) { cc.stack = append(cc.stack, asm.Off) asm.Testb(amd64.Imm{0xff}, amd64.Indirect{amd64.Rax, 0, 8}) asm.JccRel(amd64.CC_Z, gojit.Addr(asm.Buf[asm.Off:])) }