From: CoolSun20 on 12 Jul 2010 13:33 Within my x86 driver I update EBP. using inline assembley, push and pop EBP before my module exits.. I am now porting that logic to AMD64 architecture, due to restrictions of not able to use inline assembley within my amd64 driver is there a way to update framepointer value(EBP) before I exit my module. I found an intrinsic function to retrieve addressofreturnaddress and I can obtain the value which I want in EBP from this API . Question is how to use this value to update the EBP register contents? Is there any intrinsic counterpart which I can use or any other method..Hope I am clear on my concern.. Thanks in advance..
From: Scott Noone on 12 Jul 2010 14:22 > Within my x86 driver I update EBP. using inline assembley, push and pop > EBP > before my module exits.. Why do you do this? > I am now porting that logic to AMD64 architecture, due to restrictions of > not able to use inline assembley within my amd64 driver is there a way to > update framepointer value(EBP) before I exit my module. The x64 compiler doesn't use RBP as a frame pointer, so I'm confused as to why this is necessary. -scott -- Scott Noone Consulting Associate OSR Open Systems Resources, Inc. http://www.osronline.com "CoolSun20" <CoolSun20(a)discussions.microsoft.com> wrote in message news:F885E310-6080-4B13-BBB5-4463F960A651(a)microsoft.com... > Within my x86 driver I update EBP. using inline assembley, push and pop > EBP > before my module exits.. > I am now porting that logic to AMD64 architecture, due to restrictions of > not able to use inline assembley within my amd64 driver is there a way to > update framepointer value(EBP) before I exit my module. I found an > intrinsic > function to retrieve addressofreturnaddress and I can obtain the value > which > I want in EBP from this API . Question is how to use this value to update > the EBP register contents? Is there any intrinsic counterpart which I can > use > or any other method..Hope I am clear on my concern.. > > Thanks in advance..
From: Maxim S. Shatskih on 12 Jul 2010 14:27 > I am now porting that logic to AMD64 architecture, due to restrictions of > not able to use inline assembley within my amd64 driver is there a way to > update framepointer value(EBP) before I exit my module. Throw away the inline assembly and rewrite the code in C. Helps like a charm :-) -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: CoolSun20 on 13 Jul 2010 10:07 Understanding and working with some legacy code, so was just following the logic of saving and restoring EBP upon module load and exit.. Ignoring the fact of x64 frame pointer store location under x86 is it possible to replace that push EBP and Pop EBP with some intrinsics.. Considering am newbie to x64 development, what does x64 compiler use as frame pointer then. or if you please point me to good reads on this topics would be appreciated.. Thanks much.. "Scott Noone" wrote: > > Within my x86 driver I update EBP. using inline assembley, push and pop > > EBP > > before my module exits.. > > Why do you do this? > > > I am now porting that logic to AMD64 architecture, due to restrictions of > > not able to use inline assembley within my amd64 driver is there a way to > > update framepointer value(EBP) before I exit my module. > > The x64 compiler doesn't use RBP as a frame pointer, so I'm confused as to > why this is necessary. > > -scott > > -- > Scott Noone > Consulting Associate > OSR Open Systems Resources, Inc. > http://www.osronline.com > > > "CoolSun20" <CoolSun20(a)discussions.microsoft.com> wrote in message > news:F885E310-6080-4B13-BBB5-4463F960A651(a)microsoft.com... > > Within my x86 driver I update EBP. using inline assembley, push and pop > > EBP > > before my module exits.. > > I am now porting that logic to AMD64 architecture, due to restrictions of > > not able to use inline assembley within my amd64 driver is there a way to > > update framepointer value(EBP) before I exit my module. I found an > > intrinsic > > function to retrieve addressofreturnaddress and I can obtain the value > > which > > I want in EBP from this API . Question is how to use this value to update > > the EBP register contents? Is there any intrinsic counterpart which I can > > use > > or any other method..Hope I am clear on my concern.. > > > > Thanks in advance.. >
From: Scott Noone on 13 Jul 2010 13:55 Start here: http://msdn.microsoft.com/en-us/library/ms235286.aspx The info is a bit spread out so you have to click through all of the links and read, but it's all there. -scott -- Scott Noone Consulting Associate OSR Open Systems Resources, Inc. http://www.osronline.com "CoolSun20" <CoolSun20(a)discussions.microsoft.com> wrote in message news:DFDC304F-CA39-41DA-BA1D-EF3FF2F93CED(a)microsoft.com... > Understanding and working with some legacy code, so was just following the > logic of saving and restoring EBP upon module load and exit.. Ignoring the > fact of x64 frame pointer store location under x86 is it possible to > replace > that push EBP and Pop EBP with some intrinsics.. > > Considering am newbie to x64 development, what does x64 compiler use as > frame pointer then. or if you please point me to good reads on this topics > would be appreciated.. > > Thanks much.. > > > "Scott Noone" wrote: > >> > Within my x86 driver I update EBP. using inline assembley, push and pop >> > EBP >> > before my module exits.. >> >> Why do you do this? >> >> > I am now porting that logic to AMD64 architecture, due to restrictions >> > of >> > not able to use inline assembley within my amd64 driver is there a way >> > to >> > update framepointer value(EBP) before I exit my module. >> >> The x64 compiler doesn't use RBP as a frame pointer, so I'm confused as >> to >> why this is necessary. >> >> -scott >> >> -- >> Scott Noone >> Consulting Associate >> OSR Open Systems Resources, Inc. >> http://www.osronline.com >> >> >> "CoolSun20" <CoolSun20(a)discussions.microsoft.com> wrote in message >> news:F885E310-6080-4B13-BBB5-4463F960A651(a)microsoft.com... >> > Within my x86 driver I update EBP. using inline assembley, push and pop >> > EBP >> > before my module exits.. >> > I am now porting that logic to AMD64 architecture, due to restrictions >> > of >> > not able to use inline assembley within my amd64 driver is there a way >> > to >> > update framepointer value(EBP) before I exit my module. I found an >> > intrinsic >> > function to retrieve addressofreturnaddress and I can obtain the value >> > which >> > I want in EBP from this API . Question is how to use this value to >> > update >> > the EBP register contents? Is there any intrinsic counterpart which I >> > can >> > use >> > or any other method..Hope I am clear on my concern.. >> > >> > Thanks in advance.. >>
|
Next
|
Last
Pages: 1 2 Prev: Building DLL using WDK tool Next: Get Device IOTarget from GUID in KMDF - Solved |