9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ARM instruction
@ 2005-03-10 17:46 Ronald G. Minnich
  2005-03-10 18:02 ` Bruce Ellis
  0 siblings, 1 reply; 4+ messages in thread
From: Ronald G. Minnich @ 2005-03-10 17:46 UTC (permalink / raw)
  To: 9fans


anybody know what MOVW.P is in 5a?

ron


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ARM instruction
  2005-03-10 17:46 [9fans] ARM instruction Ronald G. Minnich
@ 2005-03-10 18:02 ` Bruce Ellis
  2005-03-10 18:24   ` Ronald G. Minnich
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ellis @ 2005-03-10 18:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

the .P sets the PFLAG which "indicates that each address
in the range is incremented ... before it is used to access memory".

Froggie rulez.

brucee

On Thu, 10 Mar 2005 10:46:33 -0700 (MST), Ronald G. Minnich
<rminnich@lanl.gov> wrote:
>
> anybody know what MOVW.P is in 5a?
>
> ron


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ARM instruction
  2005-03-10 18:02 ` Bruce Ellis
@ 2005-03-10 18:24   ` Ronald G. Minnich
  2005-03-10 20:14     ` Charles Forsyth
  0 siblings, 1 reply; 4+ messages in thread
From: Ronald G. Minnich @ 2005-03-10 18:24 UTC (permalink / raw)
  To: Bruce Ellis, Fans of the OS Plan 9 from Bell Labs



On Fri, 11 Mar 2005, Bruce Ellis wrote:

> the .P sets the PFLAG which "indicates that each address
> in the range is incremented ... before it is used to access memory".

well then that worries me more.

I'm seeing a usage from 5c that is like this:

	MOVW	$16384, R3
	MOVE	$1038, R2
	MOVW.P	R2, 4(R3)

the problem is that it shouldn't be 4(R3), it should be 0(R3). And the
pre-increment only makes it worse. I can't quite figure out what 5c is
doing here.

any ARM guys left out there?

ron


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ARM instruction
  2005-03-10 18:24   ` Ronald G. Minnich
@ 2005-03-10 20:14     ` Charles Forsyth
  0 siblings, 0 replies; 4+ messages in thread
From: Charles Forsyth @ 2005-03-10 20:14 UTC (permalink / raw)
  To: 9fans

	MOVW	$1, R2
	MOVW.P	R2, $4(R3)

in the handbook P=0 is post-index and P=1 is pre-index,
but the 5? combination uses .P to mean `post index'
that
	MOVW	4(R5), ...
does what it does everywhere else.

thus .P is the relatively rare post-index, not `set the P bit'.
but with post-indexing, the hardware also automatically
writes back the post-indexed value to the base register
(``the write bit is redundant''), so the effect is to help
to step through memory (as in /sys/src/9/bitsy/l.s cacheflush).

the strange thing is, though, that i can't provoke that
code sequence with a simple variant of the example posted.
i know it's possible, because i've seen it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-10 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10 17:46 [9fans] ARM instruction Ronald G. Minnich
2005-03-10 18:02 ` Bruce Ellis
2005-03-10 18:24   ` Ronald G. Minnich
2005-03-10 20:14     ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).