Author Topic: FISTTP—Store Integer with Truncation  (Read 4683 times)

aw27

  • Guest
FISTTP—Store Integer with Truncation
« on: July 22, 2017, 05:41:54 PM »
Using this "new" x87 instruction gives the error:
"Error A2030: Instruction or register not accepted in current CPU mode".

I tried all CPU modes.

It works fine with Masm.

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: FISTTP—Store Integer with Truncation
« Reply #1 on: July 22, 2017, 05:52:07 PM »
Which UASM version doesn't work?

Code: [Select]
include \masm32\include\masm32rt.inc
.686
.xmm

.code
start:
  fldpi
  push eax
  FISTTP dword ptr [esp]
  pop ecx

  MsgBox 0, cat$(str$(ecx), " is the result"), "fisttp:", MB_OK
  exit

end start

aw27

  • Guest
Re: FISTTP—Store Integer with Truncation
« Reply #2 on: July 22, 2017, 06:02:06 PM »
This way does not:
fisttp dword ptr storedDword


jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: FISTTP—Store Integer with Truncation
« Reply #3 on: July 22, 2017, 06:15:56 PM »
For me, fisttp dword ptr storedDword works like a charm. Can you post a complete example?

aw27

  • Guest
Re: FISTTP—Store Integer with Truncation
« Reply #4 on: July 22, 2017, 06:27:43 PM »
You are right.
It works with
.686
.xmm

It does not work with
.xmm
.686

Thanks.

But it works with Masm. So probably I reported the wrong issue.  :lol:


jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: FISTTP—Store Integer with Truncation
« Reply #5 on: July 22, 2017, 07:47:26 PM »
It's not a bug but a little incompatibility. I guess the team will fix it in a day or two. Microxxxx needs a decade or two...

aw27

  • Guest
Re: FISTTP—Store Integer with Truncation
« Reply #6 on: July 22, 2017, 08:03:44 PM »
It's not a bug but a little incompatibility. I guess the team will fix it in a day or two. Microxxxx needs a decade or two...
For me there is no need to fix the incompatibility, I have repeated 10 times "First .686, second .xmm". I will never forget it :P

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: FISTTP—Store Integer with Truncation
« Reply #7 on: July 26, 2017, 01:55:16 PM »
 :biggrin:

Now you understand why MASM does not have bugs, only features that you need to understand. Thank God for ML64.

.code
  ; everything inbetween
end

 :P
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: