github.com/cloudwego/iasm@v0.2.0/x86_64/assembler_alias.go (about) 1 // 2 // Copyright 2024 CloudWeGo Authors 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 package x86_64 18 19 func alias_INT3(p *Program, vv ...interface{}) *Instruction { 20 if len(vv) == 0 { 21 return p.INT(3) 22 } else { 23 panic("instruction INT3 takes no operands") 24 } 25 } 26 27 func alias_VCMPEQPS(p *Program, vv ...interface{}) *Instruction { 28 if len(vv) >= 3 { 29 return p.VCMPPS(0x00, vv[0], vv[1], vv[2], vv[3:]...) 30 } else { 31 panic("instruction VCMPEQPS takes 3 or 4 operands") 32 } 33 } 34 35 func alias_VCMPTRUEPS(p *Program, vv ...interface{}) *Instruction { 36 if len(vv) >= 3 { 37 return p.VCMPPS(0x0f, vv[0], vv[1], vv[2], vv[3:]...) 38 } else { 39 panic("instruction VCMPTRUEPS takes 3 or 4 operands") 40 } 41 } 42 43 var _InstructionAliases = map[string]_InstructionEncoder { 44 "int3" : alias_INT3, 45 "retq" : Instructions["ret"], 46 "movabsq" : Instructions["movq"], 47 "vcmpeqps" : alias_VCMPEQPS, 48 "vcmptrueps" : alias_VCMPTRUEPS, 49 }