diff --git a/sw/banshee/src/engine.rs b/sw/banshee/src/engine.rs index 8867ce67..93330b15 100644 --- a/sw/banshee/src/engine.rs +++ b/sw/banshee/src/engine.rs @@ -386,7 +386,7 @@ impl Engine { ); if self.had_error.load(Ordering::SeqCst) { Err(anyhow!("Encountered an error during execution")) - } else if (ret & 0x1) == 0x1 { + } else if (ret & 0x1) != 0x1 { // Call the police if no return value was specified Ok(117) } else { diff --git a/sw/banshee/tests/bin/dummy b/sw/banshee/tests/bin/dummy index 25db2318..c944c1e4 100755 Binary files a/sw/banshee/tests/bin/dummy and b/sw/banshee/tests/bin/dummy differ diff --git a/sw/banshee/tests/bin/fmv b/sw/banshee/tests/bin/fmv index 11b6076b..e9f100fd 100755 Binary files a/sw/banshee/tests/bin/fmv and b/sw/banshee/tests/bin/fmv differ diff --git a/sw/banshee/tests/bin/multi_cluster b/sw/banshee/tests/bin/multi_cluster index 05380c5c..00f5745f 100755 Binary files a/sw/banshee/tests/bin/multi_cluster and b/sw/banshee/tests/bin/multi_cluster differ diff --git a/sw/banshee/tests/bin/multi_core b/sw/banshee/tests/bin/multi_core index 42f610e7..b191425c 100755 Binary files a/sw/banshee/tests/bin/multi_core and b/sw/banshee/tests/bin/multi_core differ diff --git a/sw/banshee/tests/dummy.s b/sw/banshee/tests/dummy.s index 5fad1b62..088f492b 100644 --- a/sw/banshee/tests/dummy.s +++ b/sw/banshee/tests/dummy.s @@ -15,6 +15,9 @@ _start: lw t4, 0(t1) la t1, magic2 lw t5, 0(t1) + la t0, scratch_reg + li t1, 1 + sw t1, 0(t0) wfi .section .l1,"aw",@progbits diff --git a/sw/banshee/tests/dump/dummy.dump b/sw/banshee/tests/dump/dummy.dump index 72401494..1c96c4c8 100644 --- a/sw/banshee/tests/dump/dummy.dump +++ b/sw/banshee/tests/dump/dummy.dump @@ -26,17 +26,21 @@ Disassembly of section .text: 80010020: 00032e83 lw t4,0(t1) 80010024: 00400313 li t1,4 80010028: 00032f03 lw t5,0(t1) -8001002c: 10500073 wfi +8001002c: bfff0297 auipc t0,0xbfff0 +80010030: ff428293 addi t0,t0,-12 # 40000020 +80010034: 00100313 li t1,1 +80010038: 0062a023 sw t1,0(t0) +8001003c: 10500073 wfi Disassembly of section .riscv.attributes: 00000000 <.riscv.attributes>: - 0: 2d41 jal 690 + 0: 3141 jal fffffc80 2: 0000 unimp 4: 7200 flw fs0,32(a2) 6: 7369 lui t1,0xffffa 8: 01007663 bgeu zero,a6,14 - c: 00000023 sb zero,0(zero) # 0 + c: 00000027 0x27 10: 7205 lui tp,0xfffe1 12: 3376 fld ft6,376(sp) 14: 6932 flw fs2,12(sp) @@ -48,3 +52,5 @@ Disassembly of section .riscv.attributes: 24: 3266 fld ft4,120(sp) 26: 3070 fld fa2,224(s0) 28: 645f 7032 0030 0x307032645f + 2e: 0108 addi a0,sp,128 + 30: 0b0a slli s6,s6,0x2 diff --git a/sw/banshee/tests/dump/fmv.dump b/sw/banshee/tests/dump/fmv.dump index 877c7e7f..6fbae10b 100644 --- a/sw/banshee/tests/dump/fmv.dump +++ b/sw/banshee/tests/dump/fmv.dump @@ -1,963 +1,111 @@ -bin/fmv: file format elf32-littleriscv +bin/fmv: file format elf32-littleriscv -Disassembly of section .text: - -80000000 <_start>: -80000000: 97 11 00 80 auipc gp, 524289 -80000004: 93 81 01 80 addi gp, gp, -2048 -80000008: 6f 00 80 05 j 0x80000060 - -8000000c
: -8000000c: 13 01 01 fe addi sp, sp, -32 -80000010: 23 2e 11 00 sw ra, 28(sp) -80000014: 23 2c 81 00 sw s0, 24(sp) -80000018: 13 04 01 02 addi s0, sp, 32 -8000001c: 13 05 00 00 mv a0, zero -80000020: 23 2a a4 fe sw a0, -12(s0) -80000024: b7 95 29 42 lui a1, 271001 -80000028: 93 85 d5 a3 addi a1, a1, -1475 -8000002c: 23 22 b4 fe sw a1, -28(s0) -80000030: 83 25 44 fe lw a1, -28(s0) -80000034: 07 30 84 fe fld ft0, -24(s0) -80000038: 53 00 00 f0 fmv.w.x ft0, zero -8000003c: 53 80 05 f0 fmv.w.x ft0, a1 -80000040: 93 05 00 00 mv a1, zero -80000044: d3 05 00 e0 fmv.x.w a1, ft0 -80000048: 23 22 b4 fe sw a1, -28(s0) -8000004c: 27 34 04 fe fsd ft0, -24(s0) -80000050: 03 24 81 01 lw s0, 24(sp) -80000054: 83 20 c1 01 lw ra, 28(sp) -80000058: 13 01 01 02 addi sp, sp, 32 -8000005c: 67 80 00 00 ret - -80000060 : -80000060: 93 00 00 00 mv ra, zero -80000064: 13 02 00 00 mv tp, zero -80000068: 93 02 00 00 mv t0, zero -8000006c: 13 03 00 00 mv t1, zero -80000070: 93 03 00 00 mv t2, zero -80000074: 13 04 00 00 mv s0, zero -80000078: 93 04 00 00 mv s1, zero -8000007c: 13 05 00 00 mv a0, zero -80000080: 93 05 00 00 mv a1, zero -80000084: 13 06 00 00 mv a2, zero -80000088: 93 06 00 00 mv a3, zero -8000008c: 13 07 00 00 mv a4, zero -80000090: 93 07 00 00 mv a5, zero -80000094: 13 08 00 00 mv a6, zero -80000098: 93 08 00 00 mv a7, zero -8000009c: 13 09 00 00 mv s2, zero -800000a0: 93 09 00 00 mv s3, zero -800000a4: 13 0a 00 00 mv s4, zero -800000a8: 13 05 00 00 mv a0, zero -800000ac: 93 0a 00 00 mv s5, zero -800000b0: 13 0b 00 00 mv s6, zero -800000b4: 93 0b 00 00 mv s7, zero -800000b8: 13 0c 00 00 mv s8, zero -800000bc: 93 0c 00 00 mv s9, zero -800000c0: 13 0d 00 00 mv s10, zero -800000c4: 93 0d 00 00 mv s11, zero -800000c8: 13 0e 00 00 mv t3, zero -800000cc: 93 0e 00 00 mv t4, zero -800000d0: 13 0f 00 00 mv t5, zero -800000d4: 93 0f 00 00 mv t6, zero - -800000d8 <.Lpcrel_hi0>: -800000d8: 17 01 00 c0 auipc sp, 786432 -800000dc: 13 01 01 f3 addi sp, sp, -208 -800000e0: 03 21 01 00 lw sp, 0(sp) -800000e4: 73 25 40 f1 csrr a0, mhartid - -800000e8 <.Lpcrel_hi1>: -800000e8: 97 05 00 c0 auipc a1, 786432 -800000ec: 93 85 85 f2 addi a1, a1, -216 -800000f0: 83 a5 05 00 lw a1, 0(a1) -800000f4: f3 22 10 30 csrr t0, misa -800000f8: 93 f2 02 02 andi t0, t0, 32 -800000fc: 63 82 02 00 beqz t0, 0x80000100 - -80000100 : -80000100: 13 0d 00 00 mv s10, zero -80000104: 63 1a a5 05 bne a0, s10, 0x80000158 - -80000108 <.Lpcrel_hi2>: -80000108: 17 0d 00 80 auipc s10, 524288 -8000010c: 13 0d 8d ef addi s10, s10, -264 - -80000110 <.Lpcrel_hi3>: -80000110: 97 0d 00 80 auipc s11, 524288 -80000114: 93 8d 0d ef addi s11, s11, -272 -80000118: 63 58 bd 01 bge s10, s11, 0x80000128 - -8000011c : -8000011c: 23 20 0d 00 sw zero, 0(s10) -80000120: 13 0d 4d 00 addi s10, s10, 4 -80000124: e3 dc ad ff bge s11, s10, 0x8000011c - -80000128 : -80000128: 97 02 00 80 auipc t0, 524288 -8000012c: 93 82 82 ed addi t0, t0, -296 - -80000130 <.Lpcrel_hi5>: -80000130: 17 03 00 80 auipc t1, 524288 -80000134: 13 03 03 ed addi t1, t1, -304 - -80000138 <.Lpcrel_hi6>: -80000138: 97 03 00 00 auipc t2, 0 -8000013c: 93 83 03 07 addi t2, t2, 112 -80000140: 6f 00 40 01 j 0x80000154 - -80000144 : -80000144: 83 ae 03 00 lw t4, 0(t2) -80000148: 23 a0 d2 01 sw t4, 0(t0) -8000014c: 93 82 42 00 addi t0, t0, 4 -80000150: 93 83 43 00 addi t2, t2, 4 - -80000154 : -80000154: e3 58 53 fe bge t1, t0, 0x80000144 +Disassembly of section .l1: -80000158 : -80000158: 97 02 00 c0 auipc t0, 786432 -8000015c: 93 82 82 ee addi t0, t0, -280 -80000160: 03 a6 02 00 lw a2, 0(t0) -80000164: b3 02 c5 40 sub t0, a0, a2 +00000000 : + 0: 0000 unimp + ... -80000168 <.Lpcrel_hi8>: -80000168: 17 03 00 80 auipc t1, 524288 -8000016c: 13 03 43 ea addi t1, t1, -348 -80000170: b3 92 62 00 sll t0, t0, t1 -80000174: 33 01 51 40 sub sp, sp, t0 - -80000178 : -80000178: 97 00 00 00 auipc ra, 0 -8000017c: e7 80 40 e9 jalr -364(ra) - -80000180 : -80000180: 97 02 00 50 auipc t0, 327680 -80000184: 93 82 02 e8 addi t0, t0, -384 -80000188: 23 a0 a2 00 sw a0, 0(t0) -8000018c: 6f 00 40 01 j 0x800001a0 - -80000190 : -80000190: 97 02 00 50 auipc t0, 327680 -80000194: 93 82 02 e7 addi t0, t0, -400 -80000198: 23 a0 a2 00 sw a0, 0(t0) -8000019c: 6f 00 40 00 j 0x800001a0 - -800001a0 : -800001a0: 73 00 50 10 wfi -800001a4: 6f f0 df ff j 0x800001a0 - -Disassembly of section ._user_heap: - -00000000 <._user_heap>: -... - -Disassembly of section .hostcomm: +Disassembly of section .text: -00010000 <.hostcomm>: -... +80010000 <_start>: +80010000: 00001197 auipc gp,0x1 +80010004: 8d018193 addi gp,gp,-1840 # 800108d0 <__global_pointer$> +80010008: 0040006f j 8001000c + +8001000c : +8001000c: bfff0117 auipc sp,0xbfff0 +80010010: ffc10113 addi sp,sp,-4 # 40000008 +80010014: 00012103 lw sp,0(sp) +80010018: f1402573 csrr a0,mhartid +8001001c: bfff0297 auipc t0,0xbfff0 +80010020: 0242a283 lw t0,36(t0) # 40000040 +80010024: 40550533 sub a0,a0,t0 +80010028: 00351293 slli t0,a0,0x3 +8001002c: 40510133 sub sp,sp,t0 +80010030: 00629293 slli t0,t0,0x6 +80010034: 40510133 sub sp,sp,t0 +80010038: 00010213 mv tp,sp +8001003c: 00100293 li t0,1 +80010040: 00929293 slli t0,t0,0x9 +80010044: 40520233 sub tp,tp,t0 +80010048: bfff0297 auipc t0,0xbfff0 +8001004c: fc828293 addi t0,t0,-56 # 40000010 +80010050: 0002a583 lw a1,0(t0) +80010054: 038000ef jal ra,8001008c
+80010058: 00151513 slli a0,a0,0x1 +8001005c: 00156513 ori a0,a0,1 +80010060: 0100006f j 80010070 + +80010064 : +80010064: fff00293 li t0,-1 +80010068: 00554533 xor a0,a0,t0 +8001006c: 0040006f j 80010070 + +80010070 : +80010070: f14022f3 csrr t0,mhartid +80010074: 00029863 bnez t0,80010084 +80010078: bfff0297 auipc t0,0xbfff0 +8001007c: fa828293 addi t0,t0,-88 # 40000020 +80010080: 00a2a023 sw a0,0(t0) + +80010084 : +80010084: 10500073 wfi +80010088: ffdff06f j 80010084 + +Disassembly of section .text.startup: + +8001008c
: +8001008c: 422997b7 lui a5,0x42299 +80010090: ff010113 addi sp,sp,-16 +80010094: a3d78793 addi a5,a5,-1475 # 42298a3d +80010098: 00f12223 sw a5,4(sp) +8001009c: 00412783 lw a5,4(sp) +800100a0: 00813787 fld fa5,8(sp) +800100a4: f00007d3 fmv.w.x fa5,zero +800100a8: f00787d3 fmv.w.x fa5,a5 +800100ac: 00000793 li a5,0 +800100b0: e00787d3 fmv.x.w a5,fa5 +800100b4: 00f12223 sw a5,4(sp) +800100b8: 00f13427 fsd fa5,8(sp) +800100bc: 00000513 li a0,0 +800100c0: 01010113 addi sp,sp,16 +800100c4: 00008067 ret Disassembly of section .comment: 00000000 <.comment>: - 0: 63 6c 61 6e bltu sp, t1, 0x6f8 <._user_heap+0x6f8> - 4: 67 20 76 65 - 8: 72 73 - a: 69 6f - c: 6e 20 - e: 31 32 - 10: 2e 30 - 12: 2e 30 - 14: 20 28 - 16: 67 69 74 40 - 1a: 69 69 - 1c: 73 2d 67 69 csrrs s10, 1686, a4 - 20: 74 2e - 22: 65 65 - 24: 2e 65 - 26: 74 68 - 28: 7a 2e - 2a: 63 68 3a 68 bltu s4, gp, 0x6ba <._user_heap+0x6ba> - 2e: 75 65 - 30: 74 74 - 32: 65 72 - 34: 6e 2f - 36: 73 6e 69 74 csrrsi t3, 1862, 18 - 3a: 63 68 2d 6c bltu s10, sp, 0x70a <._user_heap+0x70a> - 3e: 6c 76 - 40: 6d 2e - 42: 67 69 74 20 - 46: 38 33 - 48: 36 34 - 4a: 66 35 - 4c: 33 36 39 65 - 50: 65 65 - 52: 62 32 - 54: 64 61 - 56: 38 64 - 58: 62 32 - 5a: 62 61 - 5c: 65 37 - 5e: 37 31 36 63 lui sp, 406371 - 62: 35 34 - 64: 39 39 - 66: 33 30 64 38 - 6a: 64 66 - 6c: 39 33 - 6e: 29 00 - 70: 00 4c - 72: 69 6e - 74: 6b 65 72 3a - 78: 20 4c - 7a: 4c 44 - 7c: 20 31 - 7e: 32 2e - 80: 30 2e - 82: 30 20 - 84: 28 67 - 86: 69 74 - 88: 40 69 - 8a: 69 73 - 8c: 2d 67 - 8e: 69 74 - 90: 2e 65 - 92: 65 2e - 94: 65 74 - 96: 68 7a - 98: 2e 63 - 9a: 68 3a - 9c: 68 75 - 9e: 65 74 - a0: 74 65 - a2: 72 6e - a4: 2f 73 6e 69 - a8: 74 63 - aa: 68 2d - ac: 6c 6c - ae: 76 6d - b0: 2e 67 - b2: 69 74 - b4: 20 38 - b6: 33 36 34 66 - ba: 35 33 - bc: 36 39 - be: 65 65 - c0: 65 62 - c2: 32 64 - c4: 61 38 - c6: 64 62 - c8: 32 62 - ca: 61 65 - cc: 37 37 31 36 lui a4, 221971 - d0: 63 35 34 39 - d4: 39 33 - d6: 30 64 - d8: 38 64 - da: 66 39 - dc: 33 - dd: 29 00 + 0: 3a434347 fmsub.d ft6,ft6,ft4,ft7,rmm + 4: 2820 fld fs0,80(s0) + 6: 29554e47 fmsub.s ft8,fa0,fs5,ft5,rmm + a: 3120 fld fs0,96(a0) + c: 2e30 fld fa2,88(a2) + e: 2e32 fld ft8,264(sp) + 10: 0030 addi a2,sp,8 Disassembly of section .riscv.attributes: 00000000 <.riscv.attributes>: - 0: 41 2f - 2: 00 00 - 4: 00 72 - 6: 69 73 - 8: 63 76 00 01 bgeu zero, a6, 0x14 <._user_heap+0x14> - c: 25 00 - e: 00 00 - 10: 04 10 - 12: 05 72 - 14: 76 33 - 16: 32 69 - 18: 32 70 - 1a: 30 5f - 1c: 6d 32 - 1e: 70 30 - 20: 5f 61 32 70 - 24: 30 5f - 26: 66 32 - 28: 70 30 - 2a: 5f 64 32 70 - 2e: 30 00 - -Disassembly of section .symtab: - -00000000 <.symtab>: - ... - 10: 24 02 - 12: 00 00 - 14: d8 00 - 16: 00 80 - 18: 00 00 - 1a: 00 00 - 1c: 00 00 - 1e: 01 00 - 20: 11 02 - 22: 00 00 - 24: e8 00 - 26: 00 80 - 28: 00 00 - 2a: 00 00 - 2c: 00 00 - 2e: 01 00 - 30: 30 02 - 32: 00 00 - 34: 90 01 - 36: 00 80 - 38: 00 00 - 3a: 00 00 - 3c: 00 00 - 3e: 01 00 - 40: 05 02 - 42: 00 00 - 44: 08 01 - 46: 00 80 - 48: 00 00 - 4a: 00 00 - 4c: 00 00 - 4e: 01 00 - 50: f9 01 - 52: 00 00 - 54: 10 01 - 56: 00 80 - 58: 00 00 - 5a: 00 00 - 5c: 00 00 - 5e: 01 00 - 60: ed 01 - 62: 00 00 - 64: 28 01 - 66: 00 80 - 68: 00 00 - 6a: 00 00 - 6c: 00 00 - 6e: 01 00 - 70: e1 01 - 72: 00 00 - 74: 30 01 - 76: 00 80 - 78: 00 00 - 7a: 00 00 - 7c: 00 00 - 7e: 01 00 - 80: d5 01 - 82: 00 00 - 84: 38 01 - 86: 00 80 - 88: 00 00 - 8a: 00 00 - 8c: 00 00 - 8e: 01 00 - 90: c9 01 - 92: 00 00 - 94: 58 01 - 96: 00 80 - 98: 00 00 - 9a: 00 00 - 9c: 00 00 - 9e: 01 00 - a0: bd 01 - a2: 00 00 - a4: 68 01 - a6: 00 80 - a8: 00 00 - aa: 00 00 - ac: 00 00 - ae: 01 00 - b0: b1 01 - b2: 00 00 - b4: 80 01 - b6: 00 80 - b8: 00 00 - ba: 00 00 - bc: 00 00 - be: 01 00 - c0: 1d 02 - c2: 00 00 - c4: 00 00 - c6: 00 80 - c8: 00 00 - ca: 00 00 - cc: 00 00 - ce: 01 00 - d0: 3d 00 - d2: 00 00 - d4: 44 01 - d6: 00 80 - d8: 00 00 - da: 00 00 - dc: 00 00 - de: 01 00 - e0: 42 00 - e2: 00 00 - e4: 00 01 - e6: 00 80 - e8: 00 00 - ea: 00 00 - ec: 00 00 - ee: 01 00 - f0: 6a 01 - f2: 00 00 - f4: a0 01 - f6: 00 80 - f8: 00 00 - fa: 00 00 - fc: 00 00 - fe: 01 00 - 100: 7d 01 - 102: 00 00 - 104: 80 01 - 106: 00 80 - 108: 00 00 - 10a: 00 00 - 10c: 00 00 - 10e: 01 00 - 110: 8f 00 00 00 - 114: 90 01 - 116: 00 80 - 118: 00 00 - 11a: 00 00 - 11c: 00 00 - 11e: 01 00 - 120: 38 00 - 122: 00 00 - 124: 54 01 - 126: 00 80 - 128: 00 00 - 12a: 00 00 - 12c: 00 00 - 12e: 01 00 - 130: 01 00 - 132: 00 00 - 134: 78 01 - 136: 00 80 - 138: 00 00 - 13a: 00 00 - 13c: 00 00 - 13e: 01 00 - 140: 6f 00 00 00 j 0x140 <._user_heap+0x140> - 144: 60 00 - 146: 00 80 - 148: 00 00 - 14a: 00 00 - 14c: 00 00 - 14e: 01 00 - 150: 86 00 - 152: 00 00 - 154: 78 01 - 156: 00 80 - 158: 00 00 - 15a: 00 00 - 15c: 00 00 - 15e: 01 00 - 160: 2d 00 - 162: 00 00 - 164: 58 01 - 166: 00 80 - 168: 00 00 - 16a: 00 00 - 16c: 00 00 - 16e: 01 00 - 170: 7c 00 - 172: 00 00 - 174: 1c 01 - 176: 00 80 - 178: 00 00 - 17a: 00 00 - 17c: 00 00 - 17e: 01 00 - 180: 6f 01 00 00 jal sp, 0x180 <._user_heap+0x180> - 184: 28 01 - 186: 00 80 - 188: 00 00 - 18a: 00 00 - 18c: 00 00 - 18e: 01 00 - 190: 8a 00 - 192: 00 00 - 194: 0c 00 - 196: 00 80 - 198: 54 00 - 19a: 00 00 - 19c: 12 00 - 19e: 01 00 - 1a0: 4c 00 - 1a2: 00 00 - 1a4: 0c 00 - 1a6: 00 00 - 1a8: 00 00 - 1aa: 00 00 - 1ac: 10 00 - 1ae: f1 ff - 1b0: 3d 02 - 1b2: 00 00 - 1b4: 00 08 - 1b6: 00 00 - 1b8: 00 00 - 1ba: 00 00 - 1bc: 10 00 - 1be: 03 00 69 00 lb zero, 6(s2) - ... - 1ca: 00 00 - 1cc: 10 00 - 1ce: 04 00 - 1d0: 90 01 - ... - 1da: 00 00 - 1dc: 10 00 - 1de: 03 00 63 00 lb zero, 6(t1) - ... - 1ea: 00 00 - 1ec: 10 00 - 1ee: 04 00 - 1f0: 81 01 - ... - 1fa: 00 00 - 1fc: 10 00 - 1fe: 03 00 88 01 lb zero, 24(a6) - 202: 00 00 - 204: a8 01 - 206: 00 80 - 208: 00 00 - 20a: 00 00 - 20c: 10 00 - 20e: f1 ff - 210: 26 00 - 212: 00 00 - 214: 00 00 - 216: 00 80 - 218: 00 00 - 21a: 00 00 - 21c: 10 00 - 21e: 01 00 - 220: 29 01 - 222: 00 00 - 224: 40 00 - 226: 00 40 - 228: 00 00 - 22a: 00 00 - 22c: 10 00 - 22e: f1 ff - 230: 57 00 00 00 - 234: 00 00 - 236: 00 d0 - 238: 00 00 - 23a: 00 00 - 23c: 10 00 - 23e: f1 ff - 240: bb 00 00 00 - 244: 10 00 - 246: 00 40 - 248: 00 00 - 24a: 00 00 - 24c: 10 00 - 24e: f1 ff - 250: d0 00 - 252: 00 00 - 254: 08 00 - 256: 00 40 - 258: 00 00 - 25a: 00 00 - 25c: 10 00 - 25e: f1 ff - 260: 55 01 - 262: 00 00 - 264: 00 00 - 266: 01 00 - 268: 00 00 - 26a: 00 00 - 26c: 10 00 - 26e: f1 ff - 270: 4b 01 00 00 fnmsub.s ft2, ft0, ft0, ft0, rne - 274: 00 10 - 276: 00 00 - 278: 00 00 - 27a: 00 00 - 27c: 10 00 - 27e: f1 ff - 280: 05 00 - 282: 00 00 - 284: a8 01 - 286: 00 80 - 288: 00 00 - 28a: 00 00 - 28c: 10 00 - 28e: 01 00 - 290: 97 01 00 00 auipc gp, 0 - ... - 29c: 10 00 - 29e: 04 00 - 2a0: a5 01 - ... - 2aa: 00 00 - 2ac: 10 00 - 2ae: 04 00 - 2b0: 0c 00 - 2b2: 00 00 - 2b4: 00 00 - 2b6: 01 00 - 2b8: 00 00 - 2ba: 00 00 - 2bc: 10 00 - 2be: f1 ff - 2c0: 13 00 00 00 nop - 2c4: 50 00 - 2c6: 01 00 - 2c8: 00 00 - 2ca: 00 00 - 2cc: 10 00 - 2ce: f1 ff - 2d0: 60 01 - 2d2: 00 00 - 2d4: a0 00 - 2d6: 01 00 - 2d8: 00 00 - 2da: 00 00 - 2dc: 10 00 - 2de: f1 ff - 2e0: 41 01 - 2e2: 00 00 - 2e4: b0 00 - 2e6: 01 00 - 2e8: 00 00 - 2ea: 00 00 - 2ec: 10 00 - 2ee: f1 ff - 2f0: a4 00 - 2f2: 00 00 - 2f4: 00 00 - 2f6: 00 40 - 2f8: 00 00 - 2fa: 00 00 - 2fc: 10 00 - 2fe: f1 ff - 300: 18 01 - 302: 00 00 - 304: 18 00 - 306: 00 40 - 308: 00 00 - 30a: 00 00 - 30c: 10 00 - 30e: f1 ff - 310: fd 00 - 312: 00 00 - 314: 20 00 - 316: 00 40 - 318: 00 00 - 31a: 00 00 - 31c: 10 00 - 31e: f1 ff - 320: f1 00 - 322: 00 00 - 324: 28 00 - 326: 00 40 - 328: 00 00 - 32a: 00 00 - 32c: 10 00 - 32e: f1 ff - 330: 94 00 - 332: 00 00 - 334: 30 00 - 336: 00 40 - 338: 00 00 - 33a: 00 00 - 33c: 10 00 - 33e: f1 ff - 340: e5 00 - 342: 00 00 - 344: 38 00 - 346: 00 40 - 348: 00 00 - 34a: 00 00 - 34c: 10 00 - 34e: f1 ff - 350: 09 01 - 352: 00 00 - 354: 00 48 - 356: 20 00 - 358: 00 00 - 35a: 00 00 - 35c: 10 00 - 35e: f1 ff - 360: 1c 00 - 362: 00 00 - 364: 00 00 - 366: 00 c0 - 368: 00 00 - 36a: 00 00 - 36c: 10 00 - 36e: f1 ff - -Disassembly of section .shstrtab: - -00000000 <.shstrtab>: - 0: 00 2e - 2: 74 65 - 4: 78 74 - 6: 00 2e - 8: 63 6f 6d 6d bltu s10, s6, 0x6e6 <._user_heap+0x6e6> - c: 65 6e - e: 74 00 - 10: 2e 62 - 12: 73 73 00 2e csrrci t1, 736, 0 - 16: 72 69 - 18: 73 63 76 2e csrrsi t1, 743, 12 - 1c: 61 74 - 1e: 74 72 - 20: 69 62 - 22: 75 74 - 24: 65 73 - 26: 00 2e - 28: 5f 75 73 65 - 2c: 72 5f - 2e: 68 65 - 30: 61 70 - 32: 00 2e - 34: 68 6f - 36: 73 74 63 6f csrrci s0, 1782, 6 - 3a: 6d 6d - 3c: 00 2e - 3e: 73 68 73 74 csrrsi a6, 1863, 6 - 42: 72 74 - 44: 61 62 - 46: 00 2e - 48: 73 74 72 74 csrrci s0, 1863, 4 - 4c: 61 62 - 4e: 00 2e - 50: 73 79 6d 74 csrrci s2, 1862, 26 - 54: 61 62 - 56: 00 2e - 58: 72 6f - 5a: 64 61 - 5c: 74 61 - 5e: 00 2e - 60: 64 61 - 62: 74 61 - 64: 00 - -Disassembly of section .strtab: - -00000000 <.strtab>: - 0: 00 72 - 2: 64 79 - 4: 00 5f - 6: 65 74 - 8: 65 78 - a: 74 00 - c: 74 6f - e: 68 6f - 10: 73 74 00 66 csrrci s0, 1632, 0 - 14: 72 6f - 16: 6d 68 - 18: 6f 73 74 00 jal t1, 0x4781e <.hostcomm+0x3781e> - 1c: 66 61 - 1e: 6b 65 5f 75 - 22: 61 72 - 24: 74 00 - 26: 5f 73 74 61 - 2a: 72 74 - 2c: 00 73 - 2e: 74 61 - 30: 63 6b 5f 69 bltu t5, s5, 0x6c6 <._user_heap+0x6c6> - 34: 6e 69 - 36: 74 00 - 38: 6c 6f - 3a: 6f 70 5f 63 j 0xf7e6e <.hostcomm+0xe7e6e> - 3e: 6f 70 79 5f j 0x97e34 <.hostcomm+0x87e34> - 42: 64 61 - 44: 74 61 - 46: 5f 69 6e 69 - 4a: 74 00 - 4c: 53 74 61 63 - 50: 6b 53 68 69 - 54: 66 74 - 56: 00 65 - 58: 6f 63 5f 61 jal t1, 0xf6e6c <.hostcomm+0xe6e6c> - 5c: 64 64 - 5e: 72 65 - 60: 73 73 00 5f csrrci t1, 1520, 0 - 64: 73 62 73 73 csrrsi tp, 1847, 6 - 68: 00 5f - 6a: 65 62 - 6c: 73 73 00 72 csrrci t1, 1824, 0 - 70: 65 73 - 72: 65 74 - 74: 5f 76 65 63 - 78: 74 6f - 7a: 72 00 - 7c: 7a 65 - 7e: 72 6f - 80: 5f 6c 6f 6f - 84: 70 00 - 86: 72 75 - 88: 6e 00 - 8a: 6d 61 - 8c: 69 6e - 8e: 00 66 - 90: 61 69 - 92: 6c 00 - 94: 63 79 63 6c bgeu t1, t1, 0x766 <._user_heap+0x766> - 98: 65 5f - 9a: 63 6f 75 6e bltu a0, t2, 0x798 <._user_heap+0x798> - 9e: 74 5f - a0: 72 65 - a2: 67 00 74 63 jr 1591(s0) - a6: 64 6d - a8: 5f 73 74 61 - ac: 72 74 - ae: 5f 61 64 64 - b2: 72 65 - b4: 73 73 5f 72 csrrci t1, 1829, 30 - b8: 65 67 - ba: 00 6e - bc: 72 5f - be: 63 6f 72 65 bltu tp, s7, 0x71c <._user_heap+0x71c> - c2: 73 5f 61 64 csrrwi t5, 1606, 2 - c6: 64 72 - c8: 65 73 - ca: 73 5f 72 65 csrrwi t5, 1623, 4 - ce: 67 00 74 63 jr 1591(s0) - d2: 64 6d - d4: 5f 65 6e 64 - d8: 5f 61 64 64 - dc: 72 65 - de: 73 73 5f 72 csrrci t1, 1829, 30 - e2: 65 67 - e4: 00 62 - e6: 61 72 - e8: 72 69 - ea: 65 72 - ec: 5f 72 65 67 - f0: 00 77 - f2: 61 6b - f4: 65 5f - f6: 75 70 - f8: 5f 72 65 67 - fc: 00 73 - fe: 63 72 61 74 bgeu sp, t1, 0x842 <._user_heap+0x842> - 102: 63 68 5f 72 bltu t5, t0, 0x832 <._user_heap+0x832> - 106: 65 67 - 108: 00 73 - 10a: 73 72 5f 63 csrrci tp, 1589, 30 - 10e: 6f 6e 66 69 jal t3, 0x667a4 <.hostcomm+0x567a4> - 112: 67 5f 72 65 - 116: 67 00 66 65 jr 1622(a2) - 11a: 74 63 - 11c: 68 5f - 11e: 65 6e - 120: 61 62 - 122: 6c 65 - 124: 5f 72 65 67 - 128: 00 63 - 12a: 6c 75 - 12c: 73 65 72 5f csrrsi a0, 1527, 4 - 130: 62 61 - 132: 73 65 5f 68 csrrsi a0, 1669, 30 - 136: 61 72 - 138: 74 5f - 13a: 69 64 - 13c: 5f 72 65 67 - 140: 00 5f - 142: 5f 6c 33 5f - 146: 73 69 7a 65 csrrsi s2, 1623, 20 - 14a: 00 53 - 14c: 74 61 - 14e: 63 6b 53 69 bltu t1, s5, 0x7e4 <._user_heap+0x7e4> - 152: 7a 65 - 154: 00 5f - 156: 48 65 - 158: 61 70 - 15a: 5f 53 69 7a - 15e: 65 00 - 160: 5f 5f 6c 33 - 164: 5f 62 61 73 - 168: 65 00 - 16a: 64 6f - 16c: 6e 65 - 16e: 00 7a - 170: 65 72 - 172: 6f 5f 6c 6f jal t5, 0xc5868 <.hostcomm+0xb5868> - 176: 6f 70 5f 65 j 0xf7fca <.hostcomm+0xe7fca> - 17a: 6e 64 - 17c: 00 65 - 17e: 6f 63 00 5f jal t1, 0x676e <._user_heap+0x676e> - 182: 73 64 61 74 csrrsi s0, 1862, 2 - 186: 61 00 - 188: 5f 73 69 64 - 18c: 61 74 - 18e: 61 00 - 190: 5f 65 64 61 - 194: 74 61 - 196: 00 5f - 198: 5f 62 73 73 - 19c: 5f 73 74 61 - 1a0: 72 74 - 1a2: 5f 5f 00 5f - 1a6: 5f 62 73 73 - 1aa: 5f 65 6e 64 - 1ae: 5f 5f 00 2e - 1b2: 4c 70 - 1b4: 63 72 65 6c bgeu a0, t1, 0x878 <._user_heap+0x878> - 1b8: 5f 68 69 39 - 1bc: 00 2e - 1be: 4c 70 - 1c0: 63 72 65 6c bgeu a0, t1, 0x884 <._user_heap+0x884> - 1c4: 5f 68 69 38 - 1c8: 00 2e - 1ca: 4c 70 - 1cc: 63 72 65 6c bgeu a0, t1, 0x890 <._user_heap+0x890> - 1d0: 5f 68 69 37 - 1d4: 00 2e - 1d6: 4c 70 - 1d8: 63 72 65 6c bgeu a0, t1, 0x89c <._user_heap+0x89c> - 1dc: 5f 68 69 36 - 1e0: 00 2e - 1e2: 4c 70 - 1e4: 63 72 65 6c bgeu a0, t1, 0x8a8 <._user_heap+0x8a8> - 1e8: 5f 68 69 35 - 1ec: 00 2e - 1ee: 4c 70 - 1f0: 63 72 65 6c bgeu a0, t1, 0x8b4 <._user_heap+0x8b4> - 1f4: 5f 68 69 34 - 1f8: 00 2e - 1fa: 4c 70 - 1fc: 63 72 65 6c bgeu a0, t1, 0x8c0 <._user_heap+0x8c0> - 200: 5f 68 69 33 - 204: 00 2e - 206: 4c 70 - 208: 63 72 65 6c bgeu a0, t1, 0x8cc <._user_heap+0x8cc> - 20c: 5f 68 69 32 - 210: 00 2e - 212: 4c 70 - 214: 63 72 65 6c bgeu a0, t1, 0x8d8 <._user_heap+0x8d8> - 218: 5f 68 69 31 - 21c: 00 2e - 21e: 4c 74 - 220: 6d 70 - 222: 30 00 - 224: 2e 4c - 226: 70 63 - 228: 72 65 - 22a: 6c 5f - 22c: 68 69 - 22e: 30 00 - 230: 2e 4c - 232: 70 63 - 234: 72 65 - 236: 6c 5f - 238: 68 69 - 23a: 31 30 - 23c: 00 5f - 23e: 5f 67 6c 6f - 242: 62 61 - 244: 6c 5f - 246: 70 6f - 248: 69 6e - 24a: 74 65 - 24c: 72 24 - 24e: 00 + 0: 3341 jal fffffd80 + 2: 0000 unimp + 4: 7200 flw fs0,32(a2) + 6: 7369 lui t1,0xffffa + 8: 01007663 bgeu zero,a6,14 + c: 0029 c.nop 10 + e: 0000 unimp + 10: 1004 addi s1,sp,32 + 12: 7205 lui tp,0xfffe1 + 14: 3376 fld ft6,376(sp) + 16: 6932 flw fs2,12(sp) + 18: 7032 flw ft0,44(sp) + 1a: 5f30 lw a2,120(a4) + 1c: 326d jal fffff9c6 + 1e: 3070 fld fa2,224(s0) + 20: 615f 7032 5f30 0x5f307032615f + 26: 3266 fld ft4,120(sp) + 28: 3070 fld fa2,224(s0) + 2a: 645f 7032 0030 0x307032645f + 30: 0108 addi a0,sp,128 + 32: 0b0a slli s6,s6,0x2 diff --git a/sw/banshee/tests/dump/multi_cluster.dump b/sw/banshee/tests/dump/multi_cluster.dump index dd348671..c0efe2b9 100644 --- a/sw/banshee/tests/dump/multi_cluster.dump +++ b/sw/banshee/tests/dump/multi_cluster.dump @@ -14,17 +14,21 @@ Disassembly of section .text: 80010018: 006282b3 add t0,t0,t1 8001001c: 00a2a023 sw a0,0(t0) 80010020: 00b2a423 sw a1,8(t0) -80010024: 10500073 wfi +80010024: bfff0297 auipc t0,0xbfff0 +80010028: ffc28293 addi t0,t0,-4 # 40000020 +8001002c: 00100313 li t1,1 +80010030: 0062a023 sw t1,0(t0) +80010034: 10500073 wfi Disassembly of section .riscv.attributes: 00000000 <.riscv.attributes>: - 0: 2d41 jal 690 + 0: 3141 jal fffffc80 2: 0000 unimp 4: 7200 flw fs0,32(a2) 6: 7369 lui t1,0xffffa 8: 01007663 bgeu zero,a6,14 - c: 00000023 sb zero,0(zero) # 0 + c: 00000027 0x27 10: 7205 lui tp,0xfffe1 12: 3376 fld ft6,376(sp) 14: 6932 flw fs2,12(sp) @@ -36,3 +40,5 @@ Disassembly of section .riscv.attributes: 24: 3266 fld ft4,120(sp) 26: 3070 fld fa2,224(s0) 28: 645f 7032 0030 0x307032645f + 2e: 0108 addi a0,sp,128 + 30: 0b0a slli s6,s6,0x2 diff --git a/sw/banshee/tests/dump/multi_core.dump b/sw/banshee/tests/dump/multi_core.dump index f1860cf4..eba5fa77 100644 --- a/sw/banshee/tests/dump/multi_core.dump +++ b/sw/banshee/tests/dump/multi_core.dump @@ -10,17 +10,21 @@ Disassembly of section .text: 80010008: 20000337 lui t1,0x20000 8001000c: 006282b3 add t0,t0,t1 80010010: 00a2a023 sw a0,0(t0) -80010014: 10500073 wfi +80010014: bfff0297 auipc t0,0xbfff0 +80010018: 00c28293 addi t0,t0,12 # 40000020 +8001001c: 00100313 li t1,1 +80010020: 0062a023 sw t1,0(t0) +80010024: 10500073 wfi Disassembly of section .riscv.attributes: 00000000 <.riscv.attributes>: - 0: 2d41 jal 690 + 0: 3141 jal fffffc80 2: 0000 unimp 4: 7200 flw fs0,32(a2) 6: 7369 lui t1,0xffffa 8: 01007663 bgeu zero,a6,14 - c: 00000023 sb zero,0(zero) # 0 + c: 00000027 0x27 10: 7205 lui tp,0xfffe1 12: 3376 fld ft6,376(sp) 14: 6932 flw fs2,12(sp) @@ -32,3 +36,5 @@ Disassembly of section .riscv.attributes: 24: 3266 fld ft4,120(sp) 26: 3070 fld fa2,224(s0) 28: 645f 7032 0030 0x307032645f + 2e: 0108 addi a0,sp,128 + 30: 0b0a slli s6,s6,0x2 diff --git a/sw/banshee/tests/multi_cluster.s b/sw/banshee/tests/multi_cluster.s index 03fa0f86..52f70c08 100644 --- a/sw/banshee/tests/multi_cluster.s +++ b/sw/banshee/tests/multi_cluster.s @@ -13,4 +13,7 @@ _start: add t0, t0, t1 sw a0, 0(t0) sw a1, 8(t0) + la t0, scratch_reg + li t1, 1 + sw t1, 0(t0) wfi diff --git a/sw/banshee/tests/multi_core.s b/sw/banshee/tests/multi_core.s index 632cae2d..ed6f33d5 100644 --- a/sw/banshee/tests/multi_core.s +++ b/sw/banshee/tests/multi_core.s @@ -10,4 +10,7 @@ _start: li t1, 0x20000000 add t0, t0, t1 sw a0, 0(t0) + la t0, scratch_reg + li t1, 1 + sw t1, 0(t0) wfi