gcc - C inline assembly of x86 fbstp instruction -


How to inline the use of fbstp on a 32-bit I86 architecture. I tried to do something like this

< Pre> int main () {double foo = 100.0; Long times = 0; Asm ("pushl% 1; fbstp% 0": "= m" (bar): "r" (af)); ...

but the bar is unchanged. I have tried to read anything I can get it on, but most examples work only by adding two integers. I'm not getting any thing about pushing the indent on the stack and when I write an instruction like FBSTP back into 80-bit data (i.e. to use C) and how to specify it in ASM syntax Go.

Besides, there is no push and no push at x86-64, but FBTP is still present, whereas FBST is not there. There is some other magic for 64 bit.

Here's an example:

Which is suggesting doing something like this :

  Unsigned low BCD [5]; double A; Asm ("fbstp% 0": "= m" (BCD [0]): "t" (a): "cents");  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -