From 4d115de2972030553dd05072979bf2cc694d5680 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 25 Nov 2020 17:34:37 -0800 Subject: [PATCH] add colors to demo encoding --- local.css | 65 +++ openpower/sv/16_bit_compressed/demo.mdwn | 424 +++++++++--------- .../sv/16_bit_compressed/demo_assembler.sh | 10 +- 3 files changed, 286 insertions(+), 213 deletions(-) diff --git a/local.css b/local.css index 4cbeec799..d3b1e7628 100644 --- a/local.css +++ b/local.css @@ -117,3 +117,68 @@ code { white-space: pre-wrap } */ + +/* add colors as classes allowing markdown files to generate colored text */ +.color-000 { + color: 000; +} + +.color-008 { + color: 008; +} + +.color-00F { + color: 00F; +} + +.color-080 { + color: 080; +} + +.color-088 { + color: 088; +} + +.color-0F0 { + color: 0F0; +} + +.color-0FF { + color: 0FF; +} + +.color-800 { + color: 800; +} + +.color-808 { + color: 808; +} + +.color-880 { + color: 880; +} + +.color-888 { + color: 888; +} + +.color-CCC { + color: CCC; +} + +.color-F00 { + color: F00; +} + +.color-F0F { + color: F0F; +} + +.color-FF0 { + color: FF0; +} + +.color-FFF { + color: FFF; +} diff --git a/openpower/sv/16_bit_compressed/demo.mdwn b/openpower/sv/16_bit_compressed/demo.mdwn index 50e83f0f2..14ae0604e 100644 --- a/openpower/sv/16_bit_compressed/demo.mdwn +++ b/openpower/sv/16_bit_compressed/demo.mdwn @@ -103,218 +103,218 @@ Note that bit numbering goes from 0 to 31 in the prefix, then 0 to 31 in the suf ## Big-Endian Machine Code -| Address | Byte | PC | Instruction | -|---------|------|--------|---------------------------| -| 0x1000 | 0x38 | 0x1000 | addi r3, r4, 5 | -| 0x1001 | 0x64 | 0x1000 | addi r3, r4, 5 | -| 0x1002 | 0x00 | 0x1000 | addi r3, r4, 5 | -| 0x1003 | 0x05 | 0x1000 | addi r3, r4, 5 | -| 0x1004 | 0x06 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1005 | 0x00 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1006 | 0xDE | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1007 | 0xAD | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1008 | 0x38 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1009 | 0x65 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100A | 0xBE | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100B | 0xEF | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100C | 0x00 | 0x100C | x.placeholder | -| 0x100D | 0x00 | 0x100C | x.placeholder | -| 0x100E | 0x00 | 0x100C | x.placeholder | -| 0x100F | 0x02 | 0x100C | x.placeholder | -| 0x1010 | 0x00 | 0x100C | x.placeholder | -| 0x1011 | 0x00 | 0x100C | x.placeholder | -| 0x1012 | 0x38 | 0x1012 | addi r3, r4, 5 | -| 0x1013 | 0x64 | 0x1012 | addi r3, r4, 5 | -| 0x1014 | 0x00 | 0x1012 | addi r3, r4, 5 | -| 0x1015 | 0x05 | 0x1012 | addi r3, r4, 5 | -| 0x1016 | 0x06 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1017 | 0x00 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1018 | 0x89 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1019 | 0xAB | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101A | 0x38 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101B | 0x65 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101C | 0xCD | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101D | 0xEF | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101E | 0x00 | 0x101E | x.placeholder | -| 0x101F | 0x00 | 0x101E | x.placeholder | -| 0x1020 | 0x00 | 0x101E | x.placeholder | -| 0x1021 | 0x02 | 0x101E | x.placeholder | -| 0x1022 | 0x00 | 0x101E | x.placeholder | -| 0x1023 | 0x00 | 0x101E | x.placeholder | -| 0x1024 | 0x14 | 0x1024 | h.add r3, r4 | -| 0x1025 | 0x02 | 0x1024 | h.add r3, r4 | -| 0x1026 | 0x38 | 0x1026 | addi r3, r6, 7 | -| 0x1027 | 0x66 | 0x1026 | addi r3, r6, 7 | -| 0x1028 | 0x00 | 0x1026 | addi r3, r6, 7 | -| 0x1029 | 0x07 | 0x1026 | addi r3, r6, 7 | -| 0x102A | 0x14 | 0x102A | hs.add r3, r31 | -| 0x102B | 0x0F | 0x102A | hs.add r3, r31 | -| 0x102C | 0x04 | 0x102C | c.add r3, r30 | -| 0x102D | 0x0C | 0x102C | c.add r3, r30 | -| 0x102E | 0x84 | 0x102E | cst.add r3, r29 | -| 0x102F | 0x0B | 0x102E | cst.add r3, r29 | -| 0x1030 | 0x06 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1031 | 0x00 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1032 | 0x12 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1033 | 0x34 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1034 | 0x38 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1035 | 0x7F | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1036 | 0x56 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1037 | 0x78 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1038 | 0x04 | 0x1038 | c.add r3, r5 | -| 0x1039 | 0x04 | 0x1038 | c.add r3, r5 | -| 0x103A | 0x04 | 0x103A | c.add r3, r3 | -| 0x103B | 0x00 | 0x103A | c.add r3, r3 | -| 0x103C | 0x04 | 0x103C | cs.add r3, r6 | -| 0x103D | 0x07 | 0x103C | cs.add r3, r6 | -| 0x103E | 0x38 | 0x103E | addi r3, r3, 0x23 | -| 0x103F | 0x63 | 0x103E | addi r3, r3, 0x23 | -| 0x1040 | 0x00 | 0x103E | addi r3, r3, 0x23 | -| 0x1041 | 0x23 | 0x103E | addi r3, r3, 0x23 | -| 0x1042 | 0x38 | 0x1042 | addi r3, r10, 0xA | -| 0x1043 | 0x6A | 0x1042 | addi r3, r10, 0xA | -| 0x1044 | 0x00 | 0x1042 | addi r3, r10, 0xA | -| 0x1045 | 0x0A | 0x1042 | addi r3, r10, 0xA | -| 0x1046 | 0x14 | 0x1046 | hs.add r3, r5 | -| 0x1047 | 0x05 | 0x1046 | hs.add r3, r5 | -| 0x1048 | 0x84 | 0x1048 | cst.add r3, r4 | -| 0x1049 | 0x03 | 0x1048 | cst.add r3, r4 | -| 0x104A | 0x14 | 0x104A | hs.add r3, r6 | -| 0x104B | 0x07 | 0x104A | hs.add r3, r6 | -| 0x104C | 0x84 | 0x104C | cst.add r3, r28 | -| 0x104D | 0x09 | 0x104C | cst.add r3, r28 | -| 0x104E | 0x14 | 0x104E | h.add r3, r29 | -| 0x104F | 0x0A | 0x104E | h.add r3, r29 | -| 0x1050 | 0x84 | 0x1050 | cst.add r3, r30 | -| 0x1051 | 0x0D | 0x1050 | cst.add r3, r30 | -| 0x1052 | 0x00 | 0x1052 | x.placeholder | -| 0x1053 | 0x00 | 0x1052 | x.placeholder | -| 0x1054 | 0x00 | 0x1052 | x.placeholder | -| 0x1055 | 0x02 | 0x1052 | x.placeholder | -| 0x1056 | 0x00 | 0x1052 | x.placeholder | -| 0x1057 | 0x00 | 0x1052 | x.placeholder | -| 0x1058 | 0x84 | 0x1058 | cst.add r3, r31 | -| 0x1059 | 0x0F | 0x1058 | cst.add r3, r31 | -| 0x105A | 0x38 | 0x105A | addi r3, r15, 0xF | -| 0x105B | 0x6F | 0x105A | addi r3, r15, 0xF | -| 0x105C | 0x00 | 0x105A | addi r3, r15, 0xF | -| 0x105D | 0x0F | 0x105A | addi r3, r15, 0xF | -| 0x105E | 0x04 | 0x105E | cs.add r3, r4 | -| 0x105F | 0x03 | 0x105E | cs.add r3, r4 | -| 0x1060 | 0x38 | 0x1060 | addi r3, r10, 0xF | -| 0x1061 | 0x6A | 0x1060 | addi r3, r10, 0xF | -| 0x1062 | 0x00 | 0x1060 | addi r3, r10, 0xF | -| 0x1063 | 0x0F | 0x1060 | addi r3, r10, 0xF | -| 0x1064 | 0x38 | 0x1064 | addi r3, r11, 0xF | -| 0x1065 | 0x6B | 0x1064 | addi r3, r11, 0xF | -| 0x1066 | 0x00 | 0x1064 | addi r3, r11, 0xF | -| 0x1067 | 0x0F | 0x1064 | addi r3, r11, 0xF | +| Address | Byte | PC | Instruction | +|---------|-----------------------------------|-------------------------------------|--------------------------------------------------------| +| 0x1000 |
0x38
|
0x1000
|
addi r3, r4, 5
| +| 0x1001 |
0x64
|
0x1000
|
addi r3, r4, 5
| +| 0x1002 |
0x00
|
0x1000
|
addi r3, r4, 5
| +| 0x1003 |
0x05
|
0x1000
|
addi r3, r4, 5
| +| 0x1004 |
0x06
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1005 |
0x00
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1006 |
0xDE
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1007 |
0xAD
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1008 |
0x38
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1009 |
0x65
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100A |
0xBE
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100B |
0xEF
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100C |
0x00
|
0x100C
|
x.placeholder
| +| 0x100D |
0x00
|
0x100C
|
x.placeholder
| +| 0x100E |
0x00
|
0x100C
|
x.placeholder
| +| 0x100F |
0x02
|
0x100C
|
x.placeholder
| +| 0x1010 |
0x00
|
0x100C
|
x.placeholder
| +| 0x1011 |
0x00
|
0x100C
|
x.placeholder
| +| 0x1012 |
0x38
|
0x1012
|
addi r3, r4, 5
| +| 0x1013 |
0x64
|
0x1012
|
addi r3, r4, 5
| +| 0x1014 |
0x00
|
0x1012
|
addi r3, r4, 5
| +| 0x1015 |
0x05
|
0x1012
|
addi r3, r4, 5
| +| 0x1016 |
0x06
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1017 |
0x00
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1018 |
0x89
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1019 |
0xAB
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101A |
0x38
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101B |
0x65
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101C |
0xCD
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101D |
0xEF
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101E |
0x00
|
0x101E
|
x.placeholder
| +| 0x101F |
0x00
|
0x101E
|
x.placeholder
| +| 0x1020 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1021 |
0x02
|
0x101E
|
x.placeholder
| +| 0x1022 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1023 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1024 |
0x14
|
0x1024
|
h.add r3, r4
| +| 0x1025 |
0x02
|
0x1024
|
h.add r3, r4
| +| 0x1026 |
0x38
|
0x1026
|
addi r3, r6, 7
| +| 0x1027 |
0x66
|
0x1026
|
addi r3, r6, 7
| +| 0x1028 |
0x00
|
0x1026
|
addi r3, r6, 7
| +| 0x1029 |
0x07
|
0x1026
|
addi r3, r6, 7
| +| 0x102A |
0x14
|
0x102A
|
hs.add r3, r31
| +| 0x102B |
0x0F
|
0x102A
|
hs.add r3, r31
| +| 0x102C |
0x04
|
0x102C
|
c.add r3, r30
| +| 0x102D |
0x0C
|
0x102C
|
c.add r3, r30
| +| 0x102E |
0x84
|
0x102E
|
cst.add r3, r29
| +| 0x102F |
0x0B
|
0x102E
|
cst.add r3, r29
| +| 0x1030 |
0x06
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1031 |
0x00
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1032 |
0x12
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1033 |
0x34
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1034 |
0x38
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1035 |
0x7F
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1036 |
0x56
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1037 |
0x78
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1038 |
0x04
|
0x1038
|
c.add r3, r5
| +| 0x1039 |
0x04
|
0x1038
|
c.add r3, r5
| +| 0x103A |
0x04
|
0x103A
|
c.add r3, r3
| +| 0x103B |
0x00
|
0x103A
|
c.add r3, r3
| +| 0x103C |
0x04
|
0x103C
|
cs.add r3, r6
| +| 0x103D |
0x07
|
0x103C
|
cs.add r3, r6
| +| 0x103E |
0x38
|
0x103E
|
addi r3, r3, 0x23
| +| 0x103F |
0x63
|
0x103E
|
addi r3, r3, 0x23
| +| 0x1040 |
0x00
|
0x103E
|
addi r3, r3, 0x23
| +| 0x1041 |
0x23
|
0x103E
|
addi r3, r3, 0x23
| +| 0x1042 |
0x38
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1043 |
0x6A
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1044 |
0x00
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1045 |
0x0A
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1046 |
0x14
|
0x1046
|
hs.add r3, r5
| +| 0x1047 |
0x05
|
0x1046
|
hs.add r3, r5
| +| 0x1048 |
0x84
|
0x1048
|
cst.add r3, r4
| +| 0x1049 |
0x03
|
0x1048
|
cst.add r3, r4
| +| 0x104A |
0x14
|
0x104A
|
hs.add r3, r6
| +| 0x104B |
0x07
|
0x104A
|
hs.add r3, r6
| +| 0x104C |
0x84
|
0x104C
|
cst.add r3, r28
| +| 0x104D |
0x09
|
0x104C
|
cst.add r3, r28
| +| 0x104E |
0x14
|
0x104E
|
h.add r3, r29
| +| 0x104F |
0x0A
|
0x104E
|
h.add r3, r29
| +| 0x1050 |
0x84
|
0x1050
|
cst.add r3, r30
| +| 0x1051 |
0x0D
|
0x1050
|
cst.add r3, r30
| +| 0x1052 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1053 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1054 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1055 |
0x02
|
0x1052
|
x.placeholder
| +| 0x1056 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1057 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1058 |
0x84
|
0x1058
|
cst.add r3, r31
| +| 0x1059 |
0x0F
|
0x1058
|
cst.add r3, r31
| +| 0x105A |
0x38
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105B |
0x6F
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105C |
0x00
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105D |
0x0F
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105E |
0x04
|
0x105E
|
cs.add r3, r4
| +| 0x105F |
0x03
|
0x105E
|
cs.add r3, r4
| +| 0x1060 |
0x38
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1061 |
0x6A
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1062 |
0x00
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1063 |
0x0F
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1064 |
0x38
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1065 |
0x6B
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1066 |
0x00
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1067 |
0x0F
|
0x1064
|
addi r3, r11, 0xF
| ## Little-Endian Machine Code -| Address | Byte | PC | Instruction | -|---------|------|--------|---------------------------| -| 0x1000 | 0x05 | 0x1000 | addi r3, r4, 5 | -| 0x1001 | 0x00 | 0x1000 | addi r3, r4, 5 | -| 0x1002 | 0x64 | 0x1000 | addi r3, r4, 5 | -| 0x1003 | 0x38 | 0x1000 | addi r3, r4, 5 | -| 0x1004 | 0xAD | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1005 | 0xDE | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1006 | 0x00 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1007 | 0x06 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1008 | 0xEF | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x1009 | 0xBE | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100A | 0x65 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100B | 0x38 | 0x1004 | paddi r3, r5, 0xDEADBEEF | -| 0x100C | 0x02 | 0x100C | x.placeholder | -| 0x100D | 0x00 | 0x100C | x.placeholder | -| 0x100E | 0x00 | 0x100C | x.placeholder | -| 0x100F | 0x00 | 0x100C | x.placeholder | -| 0x1010 | 0x64 | 0x1012 | addi r3, r4, 5 | -| 0x1011 | 0x38 | 0x1012 | addi r3, r4, 5 | -| 0x1012 | 0x00 | 0x100C | x.placeholder | -| 0x1013 | 0x00 | 0x100C | x.placeholder | -| 0x1014 | 0x00 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1015 | 0x06 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1016 | 0x05 | 0x1012 | addi r3, r4, 5 | -| 0x1017 | 0x00 | 0x1012 | addi r3, r4, 5 | -| 0x1018 | 0x65 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1019 | 0x38 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101A | 0xAB | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101B | 0x89 | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101C | 0x00 | 0x101E | x.placeholder | -| 0x101D | 0x00 | 0x101E | x.placeholder | -| 0x101E | 0xEF | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x101F | 0xCD | 0x1016 | paddi r3, r5, 0x89ABCDEF | -| 0x1020 | 0x00 | 0x101E | x.placeholder | -| 0x1021 | 0x00 | 0x101E | x.placeholder | -| 0x1022 | 0x02 | 0x101E | x.placeholder | -| 0x1023 | 0x00 | 0x101E | x.placeholder | -| 0x1024 | 0x66 | 0x1026 | addi r3, r6, 7 | -| 0x1025 | 0x38 | 0x1026 | addi r3, r6, 7 | -| 0x1026 | 0x02 | 0x1024 | h.add r3, r4 | -| 0x1027 | 0x14 | 0x1024 | h.add r3, r4 | -| 0x1028 | 0x0F | 0x102A | hs.add r3, r31 | -| 0x1029 | 0x14 | 0x102A | hs.add r3, r31 | -| 0x102A | 0x07 | 0x1026 | addi r3, r6, 7 | -| 0x102B | 0x00 | 0x1026 | addi r3, r6, 7 | -| 0x102C | 0x0B | 0x102E | cst.add r3, r29 | -| 0x102D | 0x84 | 0x102E | cst.add r3, r29 | -| 0x102E | 0x0C | 0x102C | c.add r3, r30 | -| 0x102F | 0x04 | 0x102C | c.add r3, r30 | -| 0x1030 | 0x34 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1031 | 0x12 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1032 | 0x00 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1033 | 0x06 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1034 | 0x78 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1035 | 0x56 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1036 | 0x7F | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1037 | 0x38 | 0x1030 | paddi r3, r31, 0x12345678 | -| 0x1038 | 0x00 | 0x103A | c.add r3, r3 | -| 0x1039 | 0x04 | 0x103A | c.add r3, r3 | -| 0x103A | 0x04 | 0x1038 | c.add r3, r5 | -| 0x103B | 0x04 | 0x1038 | c.add r3, r5 | -| 0x103C | 0x63 | 0x103E | addi r3, r3, 0x23 | -| 0x103D | 0x38 | 0x103E | addi r3, r3, 0x23 | -| 0x103E | 0x07 | 0x103C | cs.add r3, r6 | -| 0x103F | 0x04 | 0x103C | cs.add r3, r6 | -| 0x1040 | 0x6A | 0x1042 | addi r3, r10, 0xA | -| 0x1041 | 0x38 | 0x1042 | addi r3, r10, 0xA | -| 0x1042 | 0x23 | 0x103E | addi r3, r3, 0x23 | -| 0x1043 | 0x00 | 0x103E | addi r3, r3, 0x23 | -| 0x1044 | 0x05 | 0x1046 | hs.add r3, r5 | -| 0x1045 | 0x14 | 0x1046 | hs.add r3, r5 | -| 0x1046 | 0x0A | 0x1042 | addi r3, r10, 0xA | -| 0x1047 | 0x00 | 0x1042 | addi r3, r10, 0xA | -| 0x1048 | 0x07 | 0x104A | hs.add r3, r6 | -| 0x1049 | 0x14 | 0x104A | hs.add r3, r6 | -| 0x104A | 0x03 | 0x1048 | cst.add r3, r4 | -| 0x104B | 0x84 | 0x1048 | cst.add r3, r4 | -| 0x104C | 0x0A | 0x104E | h.add r3, r29 | -| 0x104D | 0x14 | 0x104E | h.add r3, r29 | -| 0x104E | 0x09 | 0x104C | cst.add r3, r28 | -| 0x104F | 0x84 | 0x104C | cst.add r3, r28 | -| 0x1050 | 0x00 | 0x1052 | x.placeholder | -| 0x1051 | 0x00 | 0x1052 | x.placeholder | -| 0x1052 | 0x0D | 0x1050 | cst.add r3, r30 | -| 0x1053 | 0x84 | 0x1050 | cst.add r3, r30 | -| 0x1054 | 0x00 | 0x1052 | x.placeholder | -| 0x1055 | 0x00 | 0x1052 | x.placeholder | -| 0x1056 | 0x02 | 0x1052 | x.placeholder | -| 0x1057 | 0x00 | 0x1052 | x.placeholder | -| 0x1058 | 0x6F | 0x105A | addi r3, r15, 0xF | -| 0x1059 | 0x38 | 0x105A | addi r3, r15, 0xF | -| 0x105A | 0x0F | 0x1058 | cst.add r3, r31 | -| 0x105B | 0x84 | 0x1058 | cst.add r3, r31 | -| 0x105C | 0x03 | 0x105E | cs.add r3, r4 | -| 0x105D | 0x04 | 0x105E | cs.add r3, r4 | -| 0x105E | 0x0F | 0x105A | addi r3, r15, 0xF | -| 0x105F | 0x00 | 0x105A | addi r3, r15, 0xF | -| 0x1060 | 0x0F | 0x1060 | addi r3, r10, 0xF | -| 0x1061 | 0x00 | 0x1060 | addi r3, r10, 0xF | -| 0x1062 | 0x6A | 0x1060 | addi r3, r10, 0xF | -| 0x1063 | 0x38 | 0x1060 | addi r3, r10, 0xF | -| 0x1064 | 0x0F | 0x1064 | addi r3, r11, 0xF | -| 0x1065 | 0x00 | 0x1064 | addi r3, r11, 0xF | -| 0x1066 | 0x6B | 0x1064 | addi r3, r11, 0xF | -| 0x1067 | 0x38 | 0x1064 | addi r3, r11, 0xF | \ No newline at end of file +| Address | Byte | PC | Instruction | +|---------|-----------------------------------|-------------------------------------|--------------------------------------------------------| +| 0x1000 |
0x05
|
0x1000
|
addi r3, r4, 5
| +| 0x1001 |
0x00
|
0x1000
|
addi r3, r4, 5
| +| 0x1002 |
0x64
|
0x1000
|
addi r3, r4, 5
| +| 0x1003 |
0x38
|
0x1000
|
addi r3, r4, 5
| +| 0x1004 |
0xAD
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1005 |
0xDE
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1006 |
0x00
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1007 |
0x06
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1008 |
0xEF
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x1009 |
0xBE
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100A |
0x65
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100B |
0x38
|
0x1004
|
paddi r3, r5, 0xDEADBEEF
| +| 0x100C |
0x02
|
0x100C
|
x.placeholder
| +| 0x100D |
0x00
|
0x100C
|
x.placeholder
| +| 0x100E |
0x00
|
0x100C
|
x.placeholder
| +| 0x100F |
0x00
|
0x100C
|
x.placeholder
| +| 0x1010 |
0x64
|
0x1012
|
addi r3, r4, 5
| +| 0x1011 |
0x38
|
0x1012
|
addi r3, r4, 5
| +| 0x1012 |
0x00
|
0x100C
|
x.placeholder
| +| 0x1013 |
0x00
|
0x100C
|
x.placeholder
| +| 0x1014 |
0x00
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1015 |
0x06
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1016 |
0x05
|
0x1012
|
addi r3, r4, 5
| +| 0x1017 |
0x00
|
0x1012
|
addi r3, r4, 5
| +| 0x1018 |
0x65
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1019 |
0x38
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101A |
0xAB
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101B |
0x89
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101C |
0x00
|
0x101E
|
x.placeholder
| +| 0x101D |
0x00
|
0x101E
|
x.placeholder
| +| 0x101E |
0xEF
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x101F |
0xCD
|
0x1016
|
paddi r3, r5, 0x89ABCDEF
| +| 0x1020 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1021 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1022 |
0x02
|
0x101E
|
x.placeholder
| +| 0x1023 |
0x00
|
0x101E
|
x.placeholder
| +| 0x1024 |
0x66
|
0x1026
|
addi r3, r6, 7
| +| 0x1025 |
0x38
|
0x1026
|
addi r3, r6, 7
| +| 0x1026 |
0x02
|
0x1024
|
h.add r3, r4
| +| 0x1027 |
0x14
|
0x1024
|
h.add r3, r4
| +| 0x1028 |
0x0F
|
0x102A
|
hs.add r3, r31
| +| 0x1029 |
0x14
|
0x102A
|
hs.add r3, r31
| +| 0x102A |
0x07
|
0x1026
|
addi r3, r6, 7
| +| 0x102B |
0x00
|
0x1026
|
addi r3, r6, 7
| +| 0x102C |
0x0B
|
0x102E
|
cst.add r3, r29
| +| 0x102D |
0x84
|
0x102E
|
cst.add r3, r29
| +| 0x102E |
0x0C
|
0x102C
|
c.add r3, r30
| +| 0x102F |
0x04
|
0x102C
|
c.add r3, r30
| +| 0x1030 |
0x34
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1031 |
0x12
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1032 |
0x00
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1033 |
0x06
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1034 |
0x78
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1035 |
0x56
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1036 |
0x7F
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1037 |
0x38
|
0x1030
|
paddi r3, r31, 0x12345678
| +| 0x1038 |
0x00
|
0x103A
|
c.add r3, r3
| +| 0x1039 |
0x04
|
0x103A
|
c.add r3, r3
| +| 0x103A |
0x04
|
0x1038
|
c.add r3, r5
| +| 0x103B |
0x04
|
0x1038
|
c.add r3, r5
| +| 0x103C |
0x63
|
0x103E
|
addi r3, r3, 0x23
| +| 0x103D |
0x38
|
0x103E
|
addi r3, r3, 0x23
| +| 0x103E |
0x07
|
0x103C
|
cs.add r3, r6
| +| 0x103F |
0x04
|
0x103C
|
cs.add r3, r6
| +| 0x1040 |
0x6A
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1041 |
0x38
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1042 |
0x23
|
0x103E
|
addi r3, r3, 0x23
| +| 0x1043 |
0x00
|
0x103E
|
addi r3, r3, 0x23
| +| 0x1044 |
0x05
|
0x1046
|
hs.add r3, r5
| +| 0x1045 |
0x14
|
0x1046
|
hs.add r3, r5
| +| 0x1046 |
0x0A
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1047 |
0x00
|
0x1042
|
addi r3, r10, 0xA
| +| 0x1048 |
0x07
|
0x104A
|
hs.add r3, r6
| +| 0x1049 |
0x14
|
0x104A
|
hs.add r3, r6
| +| 0x104A |
0x03
|
0x1048
|
cst.add r3, r4
| +| 0x104B |
0x84
|
0x1048
|
cst.add r3, r4
| +| 0x104C |
0x0A
|
0x104E
|
h.add r3, r29
| +| 0x104D |
0x14
|
0x104E
|
h.add r3, r29
| +| 0x104E |
0x09
|
0x104C
|
cst.add r3, r28
| +| 0x104F |
0x84
|
0x104C
|
cst.add r3, r28
| +| 0x1050 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1051 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1052 |
0x0D
|
0x1050
|
cst.add r3, r30
| +| 0x1053 |
0x84
|
0x1050
|
cst.add r3, r30
| +| 0x1054 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1055 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1056 |
0x02
|
0x1052
|
x.placeholder
| +| 0x1057 |
0x00
|
0x1052
|
x.placeholder
| +| 0x1058 |
0x6F
|
0x105A
|
addi r3, r15, 0xF
| +| 0x1059 |
0x38
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105A |
0x0F
|
0x1058
|
cst.add r3, r31
| +| 0x105B |
0x84
|
0x1058
|
cst.add r3, r31
| +| 0x105C |
0x03
|
0x105E
|
cs.add r3, r4
| +| 0x105D |
0x04
|
0x105E
|
cs.add r3, r4
| +| 0x105E |
0x0F
|
0x105A
|
addi r3, r15, 0xF
| +| 0x105F |
0x00
|
0x105A
|
addi r3, r15, 0xF
| +| 0x1060 |
0x0F
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1061 |
0x00
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1062 |
0x6A
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1063 |
0x38
|
0x1060
|
addi r3, r10, 0xF
| +| 0x1064 |
0x0F
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1065 |
0x00
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1066 |
0x6B
|
0x1064
|
addi r3, r11, 0xF
| +| 0x1067 |
0x38
|
0x1064
|
addi r3, r11, 0xF
| \ No newline at end of file diff --git a/openpower/sv/16_bit_compressed/demo_assembler.sh b/openpower/sv/16_bit_compressed/demo_assembler.sh index 9cf2bcdfa..e78a8de00 100755 --- a/openpower/sv/16_bit_compressed/demo_assembler.sh +++ b/openpower/sv/16_bit_compressed/demo_assembler.sh @@ -40,6 +40,7 @@ small_regs[28]=4 small_regs[29]=5 small_regs[30]=6 small_regs[31]=7 +colors=("800" "880" "080" "088" "008" "808") pc=0x1000 initial_pc=$((pc)) bytes=() @@ -52,7 +53,14 @@ function out_byte() { local a b printf -v a '0x%02X' $(($1)) printf -v b '0x%04X' $((pc)) - out_byte_text "$a" "$b" "$line" + local l="$line" + if ((${#colors[@]} != 0)); then + local color="${colors[(pc - initial_pc) / 2 % ${#colors[@]}]}" + a="
$a
" + b="
$b
" + l="
$l
" + fi + out_byte_text "$a" "$b" "$l" } function out_16() { out_byte $(($1 >> 8)) -- 2.30.2