| View previous topic :: View next topic |
| Author |
Message |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Thu Oct 15, 2020 1:37 am Post subject: Bug or not implemented yet? |
|
|
the instruction
seems to be a bugging the code.
i dont think its not implemented because if it wasnt CE wouldnt accept it but it doent show any error, but on the other hand it doesnt work in ASM, in fact it also corrupts every other instruction that comes after it:
here is the proof:
| Description: |
|
| Filesize: |
25.84 KB |
| Viewed: |
1611 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Thu Oct 15, 2020 4:30 am Post subject: |
|
|
both, but it is in next version
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Thu Oct 15, 2020 5:04 am Post subject: |
|
|
| COOL. thanks for reply
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3327
|
Posted: Thu Oct 15, 2020 5:30 am Post subject: |
|
|
Intel manual sounds pretty cryptic on this instruction.
What does it actually do (how is the selection and insertion done)?
|
|
| Back to top |
|
 |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Thu Oct 15, 2020 6:29 am Post subject: |
|
|
this instruction replace 4*imm8 bytes in xmm registers (imm8 = 0,1,2,3) with the given memory or register
| Code: | | INSERTPS xmm1, xmm2/m32, imm8 |
for example if
| Code: | | xmm2: 1111aaaa 2222bbbb 3333ccccc 4444dddd |
and you want its 2222bbbb to become something like 5555EEEE without changing other values then this instruction comes in handy.
you will do
| Code: |
mov [myVal],5555EEEE
insertps xmm2,[myVal],10
|
there are many other ways as well but this is one is easier
this operates exactly opposite to extractps but instead of using general-purpose-registers/m32 it use FPU-registers(xmm)/m32
Last edited by MMM-304 on Thu Oct 15, 2020 1:00 pm; edited 1 time in total |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4706
|
Posted: Thu Oct 15, 2020 12:06 pm Post subject: |
|
|
| Quote: | INSERTPS xmm1, xmm2/m32, imm8
Insert a single-precision floating-point value selected by imm8 from xmm2/m32 into xmm1 at the specified destination element specified by imm8 and zero out destination elements in xmm1 as indicated in imm8. |
Say the source operand is an xmm register. insertps will copy one of the four floats in xmm2 into one of the four positions in xmm1.
If the source operand is an m32, there is only one position to choose, so some instruction encodings are redundant.
After copying, it may also zero some of the values in xmm1. Depending on which values you zero, some instruction encodings just don't make sense. (e.g. if the entire register gets zeroed, why copy anything)
Which position to copy from/to and which elements to zero are encoded in imm8:
- imm8[7:6] is the index into the source (i.e. which float it copies from xmm2)
- imm8[5:4] is the index into the destination (i.e. which position in xmm1 to write the float to)
- imm8[3:0] is the zmask (i.e. which positions to zero in the destination)
| Code: | // xmm0: 13.0f 14.5f -7.0f 0.45f
// xmm1: 1.0f 2.0f 3.0f 4.0f
insertps xmm0,xmm1,98
// 0x98 = 10011000
// 10 = source index 2
// 01 = destination index 1
// 1 0 0 0 = zero destination index 3
// xmm0: 13.0f 3.0f -7.0f 0.0f
// xmm1: 1.0f 2.0f 3.0f 4.0f
|
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|