neon64_mem.isa (10037:5cac77888310) | neon64_mem.isa (10339:53278be85b40) |
---|---|
1// -*- mode: c++ -*- 2 | 1// -*- mode: c++ -*- 2 |
3// Copyright (c) 2012-2013 ARM Limited | 3// Copyright (c) 2012-2014 ARM Limited |
4// All rights reserved 5// 6// The license below extends only to copyright in the software and shall 7// not be construed as granting a license to any other intellectual 8// property including but not limited to intellectual property relating 9// to a hardware implementation of the functionality of the software 10// licensed hereunder. You may use the software subject to the license 11// terms below provided that you ensure that this notice is replicated --- 146 unchanged lines hidden (view full) --- 158 NeonLoadInitiateAcc64.subst(loadIop) + \ 159 NeonLoadCompleteAcc64.subst(loadIop) + \ 160 NeonStoreExecute64.subst(storeIop) + \ 161 NeonStoreInitiateAcc64.subst(storeIop) + \ 162 NeonStoreCompleteAcc64.subst(storeIop) 163 header_output += MicroNeonMemDeclare64.subst(loadIop) + \ 164 MicroNeonMemDeclare64.subst(storeIop) 165 | 4// All rights reserved 5// 6// The license below extends only to copyright in the software and shall 7// not be construed as granting a license to any other intellectual 8// property including but not limited to intellectual property relating 9// to a hardware implementation of the functionality of the software 10// licensed hereunder. You may use the software subject to the license 11// terms below provided that you ensure that this notice is replicated --- 146 unchanged lines hidden (view full) --- 158 NeonLoadInitiateAcc64.subst(loadIop) + \ 159 NeonLoadCompleteAcc64.subst(loadIop) + \ 160 NeonStoreExecute64.subst(storeIop) + \ 161 NeonStoreInitiateAcc64.subst(storeIop) + \ 162 NeonStoreCompleteAcc64.subst(storeIop) 163 header_output += MicroNeonMemDeclare64.subst(loadIop) + \ 164 MicroNeonMemDeclare64.subst(storeIop) 165 |
166 def mkMarshalMicroOp(name, Name): | 166 def mkMarshalMicroOp(name, Name, numRegs=4): |
167 global header_output, decoder_output, exec_output 168 169 getInputCodeOp1L = '' | 167 global header_output, decoder_output, exec_output 168 169 getInputCodeOp1L = '' |
170 for v in range(4): | 170 for v in range(numRegs): |
171 for p in range(4): 172 getInputCodeOp1L += ''' 173 writeVecElem(&input[%(v)d], (XReg) AA64FpOp1P%(p)dV%(v)d_uw, 174 %(p)d, 0x2); 175 ''' % { 'v' : v, 'p' : p } 176 177 getInputCodeOp1S = '' | 171 for p in range(4): 172 getInputCodeOp1L += ''' 173 writeVecElem(&input[%(v)d], (XReg) AA64FpOp1P%(p)dV%(v)d_uw, 174 %(p)d, 0x2); 175 ''' % { 'v' : v, 'p' : p } 176 177 getInputCodeOp1S = '' |
178 for v in range(4): | 178 for v in range(numRegs): |
179 for p in range(4): 180 getInputCodeOp1S += ''' 181 writeVecElem(&input[%(v)d], (XReg) AA64FpOp1P%(p)dV%(v)dS_uw, 182 %(p)d, 0x2); 183 ''' % { 'v' : v, 'p' : p } 184 185 if name == 'deint_neon_uop': 186 --- 70 unchanged lines hidden (view full) --- 257 AA64FpDestP%(p)dV1L_uw = (uint32_t) readVecElem(temp, 258 %(p)d, 0x2); 259 ''' % { 'p' : p } 260 eCode += ''' 261 } 262 ''' 263 264 iop = InstObjParams(name, Name, 'MicroNeonMixOp64', | 179 for p in range(4): 180 getInputCodeOp1S += ''' 181 writeVecElem(&input[%(v)d], (XReg) AA64FpOp1P%(p)dV%(v)dS_uw, 182 %(p)d, 0x2); 183 ''' % { 'v' : v, 'p' : p } 184 185 if name == 'deint_neon_uop': 186 --- 70 unchanged lines hidden (view full) --- 257 AA64FpDestP%(p)dV1L_uw = (uint32_t) readVecElem(temp, 258 %(p)d, 0x2); 259 ''' % { 'p' : p } 260 eCode += ''' 261 } 262 ''' 263 264 iop = InstObjParams(name, Name, 'MicroNeonMixOp64', |
265 { 'code' : eCode }, ['IsMicroop']) | 265 { 'code' : eCode, 'op_class' : 'No_OpClass' }, 266 ['IsMicroop']) |
266 header_output += MicroNeonMixDeclare64.subst(iop) 267 exec_output += MicroNeonMixExecute64.subst(iop) 268 269 elif name == 'int_neon_uop': 270 271 eCode = ''' 272 VReg input[4]; // input data from arch. SIMD regs 273 VReg output[2]; // output data to scratch area --- 44 unchanged lines hidden (view full) --- 318 for v in range(2): 319 for p in range(4): 320 eCode += ''' 321 AA64FpDestP%(p)dV%(v)d_uw = (uint32_t) readVecElem( 322 output[%(v)d], %(p)d, 0x2); 323 ''' % { 'v': v, 'p': p} 324 325 iop = InstObjParams(name, Name, 'MicroNeonMixOp64', | 267 header_output += MicroNeonMixDeclare64.subst(iop) 268 exec_output += MicroNeonMixExecute64.subst(iop) 269 270 elif name == 'int_neon_uop': 271 272 eCode = ''' 273 VReg input[4]; // input data from arch. SIMD regs 274 VReg output[2]; // output data to scratch area --- 44 unchanged lines hidden (view full) --- 319 for v in range(2): 320 for p in range(4): 321 eCode += ''' 322 AA64FpDestP%(p)dV%(v)d_uw = (uint32_t) readVecElem( 323 output[%(v)d], %(p)d, 0x2); 324 ''' % { 'v': v, 'p': p} 325 326 iop = InstObjParams(name, Name, 'MicroNeonMixOp64', |
326 { 'code' : eCode }, ['IsMicroop']) | 327 { 'code' : eCode, 'op_class' : 'No_OpClass' }, 328 ['IsMicroop']) |
327 header_output += MicroNeonMixDeclare64.subst(iop) 328 exec_output += MicroNeonMixExecute64.subst(iop) 329 330 elif name == 'unpack_neon_uop': 331 332 eCode = ''' 333 VReg input[4]; //input data from scratch area 334 VReg output[2]; //output data to arch. SIMD regs --- 103 unchanged lines hidden (view full) --- 438 439 iop = InstObjParams(name, Name, 'MicroNeonMixLaneOp64', 440 { 'code' : eCode }, ['IsMicroop']) 441 header_output += MicroNeonMixLaneDeclare64.subst(iop) 442 exec_output += MicroNeonMixExecute64.subst(iop) 443 444 # Generate instructions 445 mkMemAccMicroOp('mem_neon_uop') | 329 header_output += MicroNeonMixDeclare64.subst(iop) 330 exec_output += MicroNeonMixExecute64.subst(iop) 331 332 elif name == 'unpack_neon_uop': 333 334 eCode = ''' 335 VReg input[4]; //input data from scratch area 336 VReg output[2]; //output data to arch. SIMD regs --- 103 unchanged lines hidden (view full) --- 440 441 iop = InstObjParams(name, Name, 'MicroNeonMixLaneOp64', 442 { 'code' : eCode }, ['IsMicroop']) 443 header_output += MicroNeonMixLaneDeclare64.subst(iop) 444 exec_output += MicroNeonMixExecute64.subst(iop) 445 446 # Generate instructions 447 mkMemAccMicroOp('mem_neon_uop') |
446 mkMarshalMicroOp('deint_neon_uop', 'MicroDeintNeon64') 447 mkMarshalMicroOp('int_neon_uop', 'MicroIntNeon64') | 448 mkMarshalMicroOp('deint_neon_uop', 'MicroDeintNeon64_1Reg', numRegs=1) 449 mkMarshalMicroOp('deint_neon_uop', 'MicroDeintNeon64_2Reg', numRegs=2) 450 mkMarshalMicroOp('deint_neon_uop', 'MicroDeintNeon64_3Reg', numRegs=3) 451 mkMarshalMicroOp('deint_neon_uop', 'MicroDeintNeon64_4Reg', numRegs=4) 452 mkMarshalMicroOp('int_neon_uop', 'MicroIntNeon64_1Reg', numRegs=1) 453 mkMarshalMicroOp('int_neon_uop', 'MicroIntNeon64_2Reg', numRegs=2) 454 mkMarshalMicroOp('int_neon_uop', 'MicroIntNeon64_3Reg', numRegs=3) 455 mkMarshalMicroOp('int_neon_uop', 'MicroIntNeon64_4Reg', numRegs=4) |
448 mkMarshalMicroOp('unpack_neon_uop', 'MicroUnpackNeon64') 449 mkMarshalMicroOp('pack_neon_uop', 'MicroPackNeon64') 450 451}}; 452 453let {{ 454 455 iop = InstObjParams('vldmult64', 'VldMult64', 'VldMultOp64', '', []) --- 16 unchanged lines hidden --- | 456 mkMarshalMicroOp('unpack_neon_uop', 'MicroUnpackNeon64') 457 mkMarshalMicroOp('pack_neon_uop', 'MicroPackNeon64') 458 459}}; 460 461let {{ 462 463 iop = InstObjParams('vldmult64', 'VldMult64', 'VldMultOp64', '', []) --- 16 unchanged lines hidden --- |