Shop OBEX P1 Docs P2 Docs Learn Events
SETMULU and SETDIVU — Parallax Forums

SETMULU and SETDIVU

David BetzDavid Betz Posts: 14,516
edited 2013-01-08 08:16 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: 14,151
    edited 2013-01-08 08:14
    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: 14,516
    edited 2013-01-08 08:16
    cgracey wrote: »
    Yes on all counts.
    Thanks Chip!
Sign In or Register to comment.