API for FPU registers raw data conversion #1950
vlasta-labsky
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Unfortunately, FPU registers by nature is not "platform-independent". I will suggest you looking at |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm making some code that reads and writes FPU registers on X86.
Now I have this
uint8_t st0[10]; // 80bit raw float
uc_reg_read(m_uc, UC_X86_REG_ST0, &st0);
float val = *reinterpret_cast<long double *>(st0);
I am not 100% sure that this is a correct way to perform the conversion for all possible host platforms.
It would be nice to include API in unicorn to read/write FPU registers in platform-independent way,
to host formats like float or double.
Beta Was this translation helpful? Give feedback.
All reactions