On Apr 20, 2022, at 07:46:49, Ian Worthington wrote:
> 
> Whilst looking at reliable techniques to detect signed and unsigned overflow 
> in integer multiplication I was checking out the late John Erhman's 
> "Assembler Language Programming for IBM System z™ Servers" in which I 
> discovered he presented this problem and solution:
> 18.2.13.(2)+ A programmer wanted to test whether the product of two positive 
> 32-bit binary
> integers was too large to fit in a 32-bit register. <snip>
> 
I have relied on:
    Multiply
    SLDA 32
    Test CC for overflow.

Works for signed integers in any quadrant.

Does "positive" mean both sign bits are zero?

Harder for unsigned.  For that reason, doesn't current z
model have a specific Unsigned Multiply instruction?

-- 
gil

Reply via email to