SETMULU and SETDIVU

David BetzDavid Betz Posts: 13,721
edited 2013-01-08 - 08:16:33 in Propeller 2
What do the SETMULU and SETDIVU instructions do? Are they for doing unsigned multiplies and divides? My guess would be that SETMULU sets the same operand as SETMULA but selects unsigned instead of signed arithmetic. Same with SETDIVU and SETDIVA. Is that correct?

Also, does the first SETDIVA clear [63:32] or better yet set it to the sign extension of what gets loaded into [31:0]?

Comments

  • cgraceycgracey Posts: 12,628
    edited 2013-01-08 - 08:14:48
    David Betz wrote: »
    What do the SETMULU and SETDIVU instructions do? Are they for doing unsigned multiplies and divides? My guess would be that SETMULU sets the same operand as SETMULA but selects unsigned instead of signed arithmetic. Same with SETDIVU and SETDIVA. Is that correct?

    Also, does the first SETDIVA clear [63:32] or better yet set it to the sign extension of what gets loaded into [31:0]?

    Yes on all counts.
  • David BetzDavid Betz Posts: 13,721
    edited 2013-01-08 - 08:16:33
    cgracey wrote: »
    Yes on all counts.
    Thanks Chip!
Sign In or Register to comment.