From 701881b0b2d3b7bc2b93f738b5a13f9be4286dc8 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 29 May 2017 17:00:09 +0200 Subject: [PATCH] Ripulita VM::status --- vm/vm.cpp | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/vm/vm.cpp b/vm/vm.cpp index ef0b69e..e035e7b 100644 --- a/vm/vm.cpp +++ b/vm/vm.cpp @@ -91,41 +91,7 @@ void VM::status(void) { DBG_SUCC(("VM Status:\n")); DBG_SUCC(("~~~~~~~~~~\n")); for (i = R0; i <= SP; i++) { - switch (i) { - case R0: - DBG_INFO(("R0:\t0x%x\n", this->regs[i])); - break; - case R1: - DBG_INFO(("R1:\t0x%x\n", this->regs[i])); - break; - case R2: - DBG_INFO(("R2:\t0x%x\n", this->regs[i])); - break; - case R3: - DBG_INFO(("R3:\t0x%x\n", this->regs[i])); - break; - case S0: - DBG_INFO(("S0:\t0x%x\n", this->regs[i])); - break; - case S1: - DBG_INFO(("S1:\t0x%x\n", this->regs[i])); - break; - case S2: - DBG_INFO(("S2:\t0x%x\n", this->regs[i])); - break; - case S3: - DBG_INFO(("S3:\t0x%x\n", this->regs[i])); - break; - case IP: - DBG_INFO(("IP:\t0x%x\n", this->regs[i])); - break; - case RP: - DBG_INFO(("RP:\t0x%x\n", this->regs[i])); - break; - case SP: - DBG_INFO(("SP:\t0x%x\n", this->regs[i])); - break; - } + DBG_INFO(("%s:\t0x%04x\n", getRegName(i), regs[i])); } DBG_INFO(("Flags: ZF = %d, CF = %d\n", flags.ZF, flags.CF)); DBG_SUCC(("~~~~~~~~~~\n"));