>>>>> "BW" == Brian Wheeler <[EMAIL PROTECTED]> writes:


  BW> =item and tx, ty, tz *

  BW> Bitwise And all bits in y with z and store the result in register x.
  BW> (x = y & z) 

just a minor thought on parrot assembler argument order. dan seems to
have picked the result register to be first. my experience with the
pdp-11 left me with the result on the right. i think the vax (dan's
favorite) followed dec's tradition and kept the result on the right. is
this ordering final?

  BW> =item eqv tx, ty, tz *

  BW> Bitwise Equivalence all bits in y with z and store the result in
  BW> register x.
  BW> [do we really need this one?  BASIC has it, but I don't know if I've
  BW> ever found a use for it.  Its (p&q)|(!p&!q), I think]

that is just !(y xor z). we can provide the op but perl as we know it
has no operator that will map to it. maybe another front end would want
it so let's have it. it is trivial to code up and won't take any space.

  BW> =item imp tx, ty, tz *

  BW> Bitwise Implication (of) all bits in y with z and store the result in
  BW> register x. [another questionable one.  Again, its a BASIC thing.  The
  BW> boolean expression for it is  (!p&!q)|q ]

wow, that is the old boolean 'if' (if p then q) operator. i have never
seen that needed. let the coder do it themselves at the language level.

  BW> =item rol tx, ty, tz *

  BW> Roll y left z bits and store the result in x.  
  BW> [what are the valid values for z?]

isn't that rotate left? rotate should require z to be the word size or
less. or we can define it to work modulo the word size. which reminds
me, is there going to be a simple language way to get the word size
(other than %Config)?

  BW> =item shl tx, ty, tz *

  BW> Shift y left z bits and store the result in x. (x = y << z)
  BW> [what are the valid values of z?]

is 0 shifted in from the right?


why the abbreviated op names? we don't want another creat(2)
controversy. :) i don't think we need to limit our op code names to any
length. old assemblers did so because of the odd speed up tricks. since
the parrot assembler will rarely be used directly and it will be written
in perl. shift_l is clearer. but then, i and many others learned short
assembler op names without trouble. we should have some consensus on op
name styles. underscores? longer names encouraged? etc.


  BW> =item shr tx, ty ,tz *

  BW> Shift y right z bits and store the result in y. (x = y >> z)
  BW> [what are the valid values of z?]

arithemetic or logical shift? does the sign bit propogate down?

  BW> =item xor tx, ty, tz *

  BW> Bitwise Exclusive-Or of all bits in y with z and store the result in
  BW> register x. (x = y ^ z)

should be near eqv as it is just its negation.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org

Reply via email to