shithub: riscv

Download patch

ref: 2b1454e81c8ee4572408096f4593678d184da130
parent: d9b9e15d6bbdae625b3613bb0a704d269cc83098
author: BurnZeZ <devnull@localhost>
date: Sat Dec 1 13:07:40 EST 2018

libdtracy: wrong operator in XORI (thanks aiju)

--- a/sys/src/libdtracy/prog.c
+++ b/sys/src/libdtracy/prog.c
@@ -138,7 +138,7 @@
 		case DTE_XOR: R[c] = R[a] ^ R[b]; break;
 		case DTE_XNOR: R[c] = ~(R[a] ^ R[b]); break;
 		case DTE_LDI: R[c] = (s64int)ins << 40 >> 54 << (ins >> 8 & 63); break;
-		case DTE_XORI: R[c] |= (s64int)ins << 40 >> 54 << (ins >> 8 & 63); break;
+		case DTE_XORI: R[c] ^= (s64int)ins << 40 >> 54 << (ins >> 8 & 63); break;
 		case DTE_LSL:
 			if((u64int)R[b] >= 64)
 				R[c] = 0;