News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

superclass machine instructions?

Started by DC, November 08, 2005, 12:13:25 AM

Previous topic - Next topic

DC

I want to make a dll that can be loaded and the thread for some of the fpu instructions would be diverted to the dll code instead of the fpu...
is it possible without the dll having to screen every instruction? [edit] or can a loaded dll cause particular fpu instructions to be coded differently durring assembly?
thanx,
DC
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net

zooba

If the intention is to EITHER use the DLL or the hardware without recompiling, you'll probably need to code both into your app.

Alternatively, you may be able to somehow define the FPU opcodes as illegal and then catch them with an illegal opcode exception handler. I think Intel had some samples on their website on how to do this.

DC

thanx, I'll look for it.
my intent is actually to recompile adding only 'LoadLibrary(*.dll)' and adding either an '#include *.h' or 'include *.inc' that starts it..it will probably need to cross platforms.
there is only three fpu instructions I want to hijack...
fcos, fsin, & fsqrt.
now that's got me wondering...couldn't I do the 'LoadLibrary(*.dll)' in the '*.inc' ? [edit] and that would be in a .code section right?
thanx for the tip,
DC
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net

DC

I've been thinkin' about it and it seems that the time invovled in checking status or states would be thwarting the whole purpose...
rather if there was a way to make the compiler think that "fcos" was a proc in the library that would be way better.
is that possible?
[edit] I supose that a search and replace wouldn't be too much to ask...
[edit_2] search and replace wont work because lots of different procs will be called that wont get the replacement...  :eek
this isn't daja vu, I'm just learning it for the 37th time
http://www.bmath.net