NORM
Normalize Integer
3-96
Syntax
NORM (.unit)
src2, dst
.unit = .L1 or .L2
Opcode map field used...
For operand type...
Unit
Opfield
src2
dst
xsint
uint
.L1, .L2
1100011
src2
dst
slong
uint
.L1, .L2
1100000
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12 11
5
4
3
2
1
0
x
op
1
1
0
s
p
3
5
5
5
7
src2
0 0 0 0 0
Description
The number of redundant sign bits of
src2 is placed in dst. Several examples
are shown in the following diagram.
1
1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x
0 1 x x x x x x
x x x x x x x x x x x x x x x
x
x
x x
x
x
x
x
In this case, NORM returns 3:
In this case, NORM returns 30:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
In this case, NORM returns 0:
In this case, NORM returns 31:
x
0 0 0 0 1 x x x
x x x x x x x x x x x x x x x
x
x
x x
x
x
x
x
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
src2
src2
src2
src2
Execution
if (cond)
norm(
src)
→
dst
else
nop