This site is no longer active and is available for archival purposes only. Registration and login is disabled.

StrongARM instruction set and opcode list


Postby jont » Sep 5, 2002 @ 2:52pm

User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby refractor » Sep 5, 2002 @ 3:21pm

I believe it'll a coprocessor instruction on the StrongARM (co-pro 15 is the only one implemented too I think).

You might have to try and force the processor into supervisor mode to access the "coprocessor", and I'm not entirely sure PocketPC2002 will let you do that. It's definitely worth a try though, because I've been doing some low-level stuff and it hasn't complained at all so far to me (though I've not tried changing modes).

You want to look at the MRS and MSR instructions - move the current processor status register (CPSR) into a general purpose register, clear the bottom 5 bits, set it to 11001 (supervisor mode) and shove it back into the CPSR (using the copro, IIRC) and see what happens. I can post more detailed code to do that tomorrow if you need it (though I'd just cut and paste from an interrupt service routine, so you might have better luck elsewhere or trying it out yourself)....

Hope that helps,

Ref.
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby refractor » Sep 5, 2002 @ 3:24pm

(Sorry, I should've said, I would think that any cache-flushing routines are buried somewhere in the vendor-specific part of the kernel and would be hard to find and pretty inaccessible/inhospitable to user routines).
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Digby » Sep 5, 2002 @ 4:21pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby refractor » Sep 5, 2002 @ 5:13pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby jont » Sep 5, 2002 @ 5:57pm

User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby Guest » Sep 5, 2002 @ 6:01pm

lea is load effective address. It's used mostly to add two or more operands to create an effective address. Stack vars, for instance, usually are relative ebp, so lea ebx,[ebp+4] adds 4 to ebp and returns the result in ebx. You can also use a scale (+4 would be index of ebp) such as lea ebx,[ebp+esi*4]. This instruction is also used as a fast multiplier, for a limited set of multipliers (can also add in an index to get x5, etc.). mov ebx, offset * works the same as a simple lea ebx, offset, but mov won't do for stack vars, and it doesn't index, and it doesn't scale, and none of this is in an ARM.
Guest
 


Postby deax » Sep 5, 2002 @ 6:07pm

deax
 


Postby jont » Sep 5, 2002 @ 6:18pm

Anon: Thanks for the reply.
I'm aware that lea is nothing to do with ARM (I did tons of x86 asm in the old days but years of self-abuse have erased the important bits), but thought an ARM assembly thread might attract some x86 types :)
So if I restrict myself to 286 instructions in real mode then I can pretty much assume that "lea reg16,[adr]" is the same as "mov reg16,number" ?
Cheers
User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby Digby » Sep 5, 2002 @ 6:46pm

You can call CacheSync from an app. I use it to flush the data cache each time I run a series of my memory bandwidth benchmarks.
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby jont » Sep 6, 2002 @ 10:31am

Digby

Sorry to sound like an idiot, but will I need Platform Builder SDK to access the CacheSync function? I don't appear to have pkfuncs in any of my include directories, or anywhere else on my HDD for that matter.

Cheers
User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby refractor » Sep 6, 2002 @ 11:24am

You'll need the pkfuncs.h file from somewhere, yes... :wink:
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby jont » Sep 6, 2002 @ 12:30pm

Time to go rooting through the yellow CDs in MSDN library then I guess :) working for a software dev company has some benefits ...
User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Previous

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum