[coreboot-gerrit] Change in coreboot[master]: device/oprom/x86emu/debug.c: Fix coding style

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Thu May 17 22:34:23 CEST 2018


Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/26354


Change subject: device/oprom/x86emu/debug.c: Fix coding style
......................................................................

device/oprom/x86emu/debug.c: Fix coding style

Change-Id: I7fd57032686de064d3ca6e9323625023eafd646e
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/device/oprom/x86emu/debug.c
1 file changed, 333 insertions(+), 298 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/26354/1

diff --git a/src/device/oprom/x86emu/debug.c b/src/device/oprom/x86emu/debug.c
index 9e216e9..dc9b683 100644
--- a/src/device/oprom/x86emu/debug.c
+++ b/src/device/oprom/x86emu/debug.c
@@ -43,388 +43,423 @@
 
 #ifdef DEBUG
 
-static void     print_encoded_bytes (u16 s, u16 o);
-static void     print_decoded_instruction (void);
-int      parse_line (char *s, int *ps, int *n);
+static void print_encoded_bytes(u16 s, u16 o);
+static void print_decoded_instruction(void);
+int parse_line(char *s, int *ps, int *n);
 
 /* should look something like debug's output. */
-void X86EMU_trace_regs (void)
+void X86EMU_trace_regs(void)
 {
-    if (DEBUG_TRACE()) {
-	if (M.x86.mode & (SYSMODE_PREFIX_DATA | SYSMODE_PREFIX_ADDR)) {
-	        x86emu_dump_xregs();
-	} else {
-	        x86emu_dump_regs();
+	if (DEBUG_TRACE()) {
+		if (M.x86.mode & (SYSMODE_PREFIX_DATA | SYSMODE_PREFIX_ADDR))
+			x86emu_dump_xregs();
+		else
+			x86emu_dump_regs();
 	}
-    }
-    if (DEBUG_DECODE() && ! DEBUG_DECODE_NOPRINT()) {
-        printf("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
-        print_encoded_bytes( M.x86.saved_cs, M.x86.saved_ip);
-        print_decoded_instruction();
-    }
+	if (DEBUG_DECODE() && !DEBUG_DECODE_NOPRINT()) {
+		printf("%04x:%04x ", M.x86.saved_cs, M.x86.saved_ip);
+		print_encoded_bytes(M.x86.saved_cs, M.x86.saved_ip);
+		print_decoded_instruction();
+	}
 }
 
-void X86EMU_trace_xregs (void)
+void X86EMU_trace_xregs(void)
 {
-    if (DEBUG_TRACE()) {
-        x86emu_dump_xregs();
-    }
+	if (DEBUG_TRACE())
+		x86emu_dump_xregs();
 }
 
-void x86emu_just_disassemble (void)
+void x86emu_just_disassemble(void)
 {
-    /*
-     * This routine called if the flag DEBUG_DISASSEMBLE is set kind
-     * of a hack!
-     */
-    printf("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
-    print_encoded_bytes( M.x86.saved_cs, M.x86.saved_ip);
-    print_decoded_instruction();
+	/*
+	 * This routine called if the flag DEBUG_DISASSEMBLE is set kind
+	 * of a hack!
+	 */
+	printf("%04x:%04x ", M.x86.saved_cs, M.x86.saved_ip);
+	print_encoded_bytes(M.x86.saved_cs, M.x86.saved_ip);
+	print_decoded_instruction();
 }
 
-void disassemble_forward (u16 seg, u16 off, int n)
+void disassemble_forward(u16 seg, u16 off, int n)
 {
-    X86EMU_sysEnv tregs;
-    int i;
-    u8 op1;
-    /*
-     * hack, hack, hack.  What we do is use the exact machinery set up
-     * for execution, except that now there is an additional state
-     * flag associated with the "execution", and we are using a copy
-     * of the register struct.  All the major opcodes, once fully
-     * decoded, have the following two steps: TRACE_REGS(r,m);
-     * SINGLE_STEP(r,m); which disappear if DEBUG is not defined to
-     * the preprocessor.  The TRACE_REGS macro expands to:
-     *
-     * if (debug&DEBUG_DISASSEMBLE)
-     *     {just_disassemble(); goto EndOfInstruction;}
-     *     if (debug&DEBUG_TRACE) trace_regs(r,m);
-     *
-     * ......  and at the last line of the routine.
-     *
-     * EndOfInstruction: end_instr();
-     *
-     * Up to the point where TRACE_REG is expanded, NO modifications
-     * are done to any register EXCEPT the IP register, for fetch and
-     * decoding purposes.
-     *
-     * This was done for an entirely different reason, but makes a
-     * nice way to get the system to help debug codes.
-     */
-    tregs = M;
-    tregs.x86.R_IP = off;
-    tregs.x86.R_CS = seg;
+	X86EMU_sysEnv tregs;
+	int i;
+	u8 op1;
+	/*
+	 * hack, hack, hack.  What we do is use the exact machinery set up
+	 * for execution, except that now there is an additional state
+	 * flag associated with the "execution", and we are using a copy
+	 * of the register struct.  All the major opcodes, once fully
+	 * decoded, have the following two steps: TRACE_REGS(r,m);
+	 * SINGLE_STEP(r,m); which disappear if DEBUG is not defined to
+	 * the preprocessor.  The TRACE_REGS macro expands to:
+	 *
+	 * if (debug&DEBUG_DISASSEMBLE)
+	 *     {just_disassemble(); goto EndOfInstruction;}
+	 *     if (debug&DEBUG_TRACE) trace_regs(r,m);
+	 *
+	 * ......  and at the last line of the routine.
+	 *
+	 * EndOfInstruction: end_instr();
+	 *
+	 * Up to the point where TRACE_REG is expanded, NO modifications
+	 * are done to any register EXCEPT the IP register, for fetch and
+	 * decoding purposes.
+	 *
+	 * This was done for an entirely different reason, but makes a
+	 * nice way to get the system to help debug codes.
+	 */
+	tregs = M;
+	tregs.x86.R_IP = off;
+	tregs.x86.R_CS = seg;
 
-    /* reset the decoding buffers */
-    tregs.x86.enc_str_pos = 0;
-    tregs.x86.enc_pos = 0;
+	/* reset the decoding buffers */
+	tregs.x86.enc_str_pos = 0;
+	tregs.x86.enc_pos = 0;
 
-    /* turn on the "disassemble only, no execute" flag */
-    tregs.x86.debug |= DEBUG_DISASSEMBLE_F;
+	/* turn on the "disassemble only, no execute" flag */
+	tregs.x86.debug |= DEBUG_DISASSEMBLE_F;
 
-    /* DUMP NEXT n instructions to screen in straight_line fashion */
-    /*
-     * This looks like the regular instruction fetch stream, except
-     * that when this occurs, each fetched opcode, upon seeing the
-     * DEBUG_DISASSEMBLE flag set, exits immediately after decoding
-     * the instruction.  XXX --- CHECK THAT MEM IS NOT AFFECTED!!!
-     * Note the use of a copy of the register structure...
-     */
-    for (i=0; i<n; i++) {
-        op1 = (*sys_rdb)(((u32)M.x86.R_CS<<4) + (M.x86.R_IP++));
-        (x86emu_optab[op1])(op1);
-    }
-    /* end major hack mode. */
+	/* DUMP NEXT n instructions to screen in straight_line fashion */
+	/*
+	 * This looks like the regular instruction fetch stream, except
+	 * that when this occurs, each fetched opcode, upon seeing the
+	 * DEBUG_DISASSEMBLE flag set, exits immediately after decoding
+	 * the instruction.  XXX --- CHECK THAT MEM IS NOT AFFECTED!!!
+	 * Note the use of a copy of the register structure...
+	 */
+	for (i = 0; i < n; i++) {
+		op1 = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++));
+		(x86emu_optab[op1]) (op1);
+	}
+	/* end major hack mode. */
 }
 
-void x86emu_check_ip_access (void)
+void x86emu_check_ip_access(void)
 {
-    /* NULL as of now */
+	/* NULL as of now */
 }
 
-void x86emu_check_sp_access (void)
+void x86emu_check_sp_access(void)
 {
 }
 
-void x86emu_check_mem_access (u32 dummy)
+void x86emu_check_mem_access(u32 dummy)
 {
-    /*  check bounds, etc */
+	/*  check bounds, etc */
 }
 
-void x86emu_check_data_access (uint dummy1, uint dummy2)
+void x86emu_check_data_access(uint dummy1, uint dummy2)
 {
-    /*  check bounds, etc */
+	/*  check bounds, etc */
 }
 
-void x86emu_inc_decoded_inst_len (int x)
+void x86emu_inc_decoded_inst_len(int x)
 {
-    M.x86.enc_pos += x;
+	M.x86.enc_pos += x;
 }
 
-void x86emu_decode_printf (const char *x)
+void x86emu_decode_printf(const char *x)
 {
-    strcpy(M.x86.decoded_buf+M.x86.enc_str_pos,x);
-    M.x86.enc_str_pos += strlen(x);
+	strcpy(M.x86.decoded_buf + M.x86.enc_str_pos, x);
+	M.x86.enc_str_pos += strlen(x);
 }
 
-void x86emu_decode_printf2 (const char *x, int y)
+void x86emu_decode_printf2(const char *x, int y)
 {
-    char temp[100];
-    snprintf(temp, sizeof (temp), x,y);
-    strcpy(M.x86.decoded_buf+M.x86.enc_str_pos,temp);
-    M.x86.enc_str_pos += strlen(temp);
+	char temp[100];
+	snprintf(temp, sizeof(temp), x, y);
+	strcpy(M.x86.decoded_buf + M.x86.enc_str_pos, temp);
+	M.x86.enc_str_pos += strlen(temp);
 }
 
-void x86emu_end_instr (void)
+void x86emu_end_instr(void)
 {
-    M.x86.enc_str_pos = 0;
-    M.x86.enc_pos = 0;
+	M.x86.enc_str_pos = 0;
+	M.x86.enc_pos = 0;
 }
 
-static void print_encoded_bytes (u16 s, u16 o)
+static void print_encoded_bytes(u16 s, u16 o)
 {
-    int i;
-    char buf1[64];
-    for (i=0; i< M.x86.enc_pos; i++) {
-	    snprintf(buf1+2*i, 64 - 2 * i, "%02x", fetch_data_byte_abs(s,o+i));
-    }
-    printf("%-20s ",buf1);
+	int i;
+	char buf1[64];
+	for (i = 0; i < M.x86.enc_pos; i++)
+		snprintf(buf1 + 2 * i, 64 - 2 * i, "%02x",
+			 fetch_data_byte_abs(s, o + i));
+	printf("%-20s ", buf1);
 }
 
-static void print_decoded_instruction (void)
+static void print_decoded_instruction(void)
 {
-    printf("%s", M.x86.decoded_buf);
+	printf("%s", M.x86.decoded_buf);
 }
 
-void x86emu_print_int_vect (u16 iv)
+void x86emu_print_int_vect(u16 iv)
 {
-    u16 seg,off;
+	u16 seg, off;
 
-    if (iv > 256) return;
-    seg   = fetch_data_word_abs(0,iv*4);
-    off   = fetch_data_word_abs(0,iv*4+2);
-    printf("%04x:%04x ", seg, off);
+	if (iv > 256)
+		return;
+	seg = fetch_data_word_abs(0, iv * 4);
+	off = fetch_data_word_abs(0, iv * 4 + 2);
+	printf("%04x:%04x ", seg, off);
 }
 
-void X86EMU_dump_memory (u16 seg, u16 off, u32 amt)
+void X86EMU_dump_memory(u16 seg, u16 off, u32 amt)
 {
-    u32 start = off & 0xfffffff0;
-    u32 end  = (off+16) & 0xfffffff0;
-    u32 i;
+	u32 start = off & 0xfffffff0;
+	u32 end = (off + 16) & 0xfffffff0;
+	u32 i;
 
-    while (end <= off + amt) {
-        printf("%04x:%04x ", seg, start);
-        for (i=start; i< off; i++)
-          printf("   ");
-        for (       ; i< end; i++)
-          printf("%02x ", fetch_data_byte_abs(seg,i));
-        printf("\n");
-        start = end;
-        end = start + 16;
-    }
+	while (end <= off + amt) {
+		printf("%04x:%04x ", seg, start);
+		for (i = start; i < off; i++)
+			printf("   ");
+		for (; i < end; i++)
+			printf("%02x ", fetch_data_byte_abs(seg, i));
+		printf("\n");
+		start = end;
+		end = start + 16;
+	}
 }
 
-void x86emu_single_step (void)
+void x86emu_single_step(void)
 {
 #if 0
-    char s[1024];
-    int ps[10];
-    int ntok;
-    int cmd;
-    int done;
-        int segment;
-    int offset;
-    static int breakpoint;
-    static int noDecode = 1;
+	char s[1024];
+	int ps[10];
+	int ntok;
+	int cmd;
+	int done;
+	int segment;
+	int offset;
+	static int breakpoint;
+	static int noDecode = 1;
 
-        if (DEBUG_BREAK()) {
-                if (M.x86.saved_ip != breakpoint) {
-                        return;
-                } else {
-              M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F;
-                        M.x86.debug |= DEBUG_TRACE_F;
-                        M.x86.debug &= ~DEBUG_BREAK_F;
-                        print_decoded_instruction ();
-                        X86EMU_trace_regs();
-                }
-        }
-    done=0;
-    offset = M.x86.saved_ip;
-    while (!done) {
-        printf("-");
-        (void)fgets(s, 1023, stdin);
-        cmd = parse_line(s, ps, &ntok);
-        switch(cmd) {
-          case 'u':
-            disassemble_forward(M.x86.saved_cs,(u16)offset,10);
-            break;
-          case 'd':
-                            if (ntok == 2) {
-                                    segment = M.x86.saved_cs;
-                                    offset = ps[1];
-                                    X86EMU_dump_memory(segment,(u16)offset,16);
-                                    offset += 16;
-                            } else if (ntok == 3) {
-                                    segment = ps[1];
-                                    offset = ps[2];
-                                    X86EMU_dump_memory(segment,(u16)offset,16);
-                                    offset += 16;
-                            } else {
-                                    segment = M.x86.saved_cs;
-                                    X86EMU_dump_memory(segment,(u16)offset,16);
-                                    offset += 16;
-                            }
-            break;
-          case 'c':
-            M.x86.debug ^= DEBUG_TRACECALL_F;
-            break;
-          case 's':
-            M.x86.debug ^= DEBUG_SVC_F | DEBUG_SYS_F | DEBUG_SYSINT_F;
-            break;
-          case 'r':
-            X86EMU_trace_regs();
-            break;
-          case 'x':
-            X86EMU_trace_xregs();
-            break;
-          case 'g':
-            if (ntok == 2) {
-                breakpoint = ps[1];
-        if (noDecode) {
-                        M.x86.debug |= DEBUG_DECODE_NOPRINT_F;
-        } else {
-                        M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F;
-        }
-        M.x86.debug &= ~DEBUG_TRACE_F;
-        M.x86.debug |= DEBUG_BREAK_F;
-        done = 1;
-            }
-            break;
-          case 'q':
-          M.x86.debug |= DEBUG_EXIT;
-          return;
-      case 'P':
-          noDecode = (noDecode)?0:1;
-          printf("Toggled decoding to %s\n",(noDecode)?"FALSE":"TRUE");
-          break;
-          case 't':
-      case 0:
-            done = 1;
-            break;
-        }
-    }
+	if (DEBUG_BREAK()) {
+		if (M.x86.saved_ip != breakpoint) {
+			return;
+		} else {
+			M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F;
+			M.x86.debug |= DEBUG_TRACE_F;
+			M.x86.debug &= ~DEBUG_BREAK_F;
+			print_decoded_instruction();
+			X86EMU_trace_regs();
+		}
+	}
+	done = 0;
+	offset = M.x86.saved_ip;
+	while (!done) {
+		printf("-");
+		(void)fgets(s, 1023, stdin);
+		cmd = parse_line(s, ps, &ntok);
+		switch (cmd) {
+		case 'u':
+			disassemble_forward(M.x86.saved_cs, (u16) offset, 10);
+			break;
+		case 'd':
+			if (ntok == 2) {
+				segment = M.x86.saved_cs;
+				offset = ps[1];
+				X86EMU_dump_memory(segment, (u16) offset, 16);
+				offset += 16;
+			} else if (ntok == 3) {
+				segment = ps[1];
+				offset = ps[2];
+				X86EMU_dump_memory(segment, (u16) offset, 16);
+				offset += 16;
+			} else {
+				segment = M.x86.saved_cs;
+				X86EMU_dump_memory(segment, (u16) offset, 16);
+				offset += 16;
+			}
+			break;
+		case 'c':
+			M.x86.debug ^= DEBUG_TRACECALL_F;
+			break;
+		case 's':
+			M.x86.debug ^=
+			    DEBUG_SVC_F | DEBUG_SYS_F | DEBUG_SYSINT_F;
+			break;
+		case 'r':
+			X86EMU_trace_regs();
+			break;
+		case 'x':
+			X86EMU_trace_xregs();
+			break;
+		case 'g':
+			if (ntok == 2) {
+				breakpoint = ps[1];
+				if (noDecode)
+					M.x86.debug |= DEBUG_DECODE_NOPRINT_F;
+				else
+					M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F;
+				M.x86.debug &= ~DEBUG_TRACE_F;
+				M.x86.debug |= DEBUG_BREAK_F;
+				done = 1;
+			}
+			break;
+		case 'q':
+			M.x86.debug |= DEBUG_EXIT;
+			return;
+		case 'P':
+			noDecode = (noDecode) ? 0 : 1;
+			printf("Toggled decoding to %s\n",
+			       (noDecode) ? "FALSE" : "TRUE");
+			break;
+		case 't':
+		case 0:
+			done = 1;
+			break;
+		}
+	}
 #endif
 }
 
 int X86EMU_trace_on(void)
 {
-    return M.x86.debug |= DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F;
+	return M.x86.debug |= DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F;
 }
 
 int X86EMU_trace_off(void)
 {
-    return M.x86.debug &= ~(DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F);
+	return M.x86.debug &= ~(DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F);
 }
 
-int parse_line (char *s, int *ps, int *n)
+int parse_line(char *s, int *ps, int *n)
 {
 #if 0
-    int cmd;
+	int cmd;
 
-    *n = 0;
-    while(*s == ' ' || *s == '\t') s++;
-    ps[*n] = *s;
-    switch (*s) {
-      case '\n':
-        *n += 1;
-        return 0;
-      default:
-        cmd = *s;
-        *n += 1;
-    }
+	*n = 0;
+	while (*s == ' ' || *s == '\t')
+		s++;
+	ps[*n] = *s;
+	switch (*s) {
+	case '\n':
+		*n += 1;
+		return 0;
+	default:
+		cmd = *s;
+		*n += 1;
+	}
 
-    while (1) {
-        while (*s != ' ' && *s != '\t' && *s != '\n')  s++;
+	while (1) {
+		while (*s != ' ' && *s != '\t' && *s != '\n')
+			s++;
 
-        if (*s == '\n')
-            return cmd;
+		if (*s == '\n')
+			return cmd;
 
-        while(*s == ' ' || *s == '\t') s++;
+		while (*s == ' ' || *s == '\t')
+			s++;
 
-        sscanf(s,"%x",&ps[*n]);
-        *n += 1;
-    }
+		sscanf(s, "%x", &ps[*n]);
+		*n += 1;
+	}
 #else
-    return 0;
+	return 0;
 #endif
 }
 
-#endif /* DEBUG */
+#endif				/* DEBUG */
 
-void x86emu_dump_regs (void)
+void x86emu_dump_regs(void)
 {
-    printf("\tAX=%04x  ", M.x86.R_AX );
-    printf("BX=%04x  ", M.x86.R_BX );
-    printf("CX=%04x  ", M.x86.R_CX );
-    printf("DX=%04x  ", M.x86.R_DX );
-    printf("SP=%04x  ", M.x86.R_SP );
-    printf("BP=%04x  ", M.x86.R_BP );
-    printf("SI=%04x  ", M.x86.R_SI );
-    printf("DI=%04x\n", M.x86.R_DI );
-    printf("\tDS=%04x  ", M.x86.R_DS );
-    printf("ES=%04x  ", M.x86.R_ES );
-    printf("SS=%04x  ", M.x86.R_SS );
-    printf("CS=%04x  ", M.x86.R_CS );
-    printf("IP=%04x   ", M.x86.R_IP );
-    if (ACCESS_FLAG(F_OF))    printf("OV ");     /* CHECKED... */
-    else                        printf("NV ");
-    if (ACCESS_FLAG(F_DF))    printf("DN ");
-    else                        printf("UP ");
-    if (ACCESS_FLAG(F_IF))    printf("EI ");
-    else                        printf("DI ");
-    if (ACCESS_FLAG(F_SF))    printf("NG ");
-    else                        printf("PL ");
-    if (ACCESS_FLAG(F_ZF))    printf("ZR ");
-    else                        printf("NZ ");
-    if (ACCESS_FLAG(F_AF))    printf("AC ");
-    else                        printf("NA ");
-    if (ACCESS_FLAG(F_PF))    printf("PE ");
-    else                        printf("PO ");
-    if (ACCESS_FLAG(F_CF))    printf("CY ");
-    else                        printf("NC ");
-    printf("\n");
+	printf("\tAX=%04x  ", M.x86.R_AX);
+	printf("BX=%04x  ", M.x86.R_BX);
+	printf("CX=%04x  ", M.x86.R_CX);
+	printf("DX=%04x  ", M.x86.R_DX);
+	printf("SP=%04x  ", M.x86.R_SP);
+	printf("BP=%04x  ", M.x86.R_BP);
+	printf("SI=%04x  ", M.x86.R_SI);
+	printf("DI=%04x\n", M.x86.R_DI);
+	printf("\tDS=%04x  ", M.x86.R_DS);
+	printf("ES=%04x  ", M.x86.R_ES);
+	printf("SS=%04x  ", M.x86.R_SS);
+	printf("CS=%04x  ", M.x86.R_CS);
+	printf("IP=%04x   ", M.x86.R_IP);
+	if (ACCESS_FLAG(F_OF))
+		printf("OV ");	/* CHECKED... */
+	else
+		printf("NV ");
+	if (ACCESS_FLAG(F_DF))
+		printf("DN ");
+	else
+		printf("UP ");
+	if (ACCESS_FLAG(F_IF))
+		printf("EI ");
+	else
+		printf("DI ");
+	if (ACCESS_FLAG(F_SF))
+		printf("NG ");
+	else
+		printf("PL ");
+	if (ACCESS_FLAG(F_ZF))
+		printf("ZR ");
+	else
+		printf("NZ ");
+	if (ACCESS_FLAG(F_AF))
+		printf("AC ");
+	else
+		printf("NA ");
+	if (ACCESS_FLAG(F_PF))
+		printf("PE ");
+	else
+		printf("PO ");
+	if (ACCESS_FLAG(F_CF))
+		printf("CY ");
+	else
+		printf("NC ");
+	printf("\n");
 }
 
-void x86emu_dump_xregs (void)
+void x86emu_dump_xregs(void)
 {
-    printf("\tEAX=%08x  ", M.x86.R_EAX );
-    printf("EBX=%08x  ", M.x86.R_EBX );
-    printf("ECX=%08x  ", M.x86.R_ECX );
-    printf("EDX=%08x\n", M.x86.R_EDX );
-    printf("\tESP=%08x  ", M.x86.R_ESP );
-    printf("EBP=%08x  ", M.x86.R_EBP );
-    printf("ESI=%08x  ", M.x86.R_ESI );
-    printf("EDI=%08x\n", M.x86.R_EDI );
-    printf("\tDS=%04x  ", M.x86.R_DS );
-    printf("ES=%04x  ", M.x86.R_ES );
-    printf("SS=%04x  ", M.x86.R_SS );
-    printf("CS=%04x  ", M.x86.R_CS );
-    printf("EIP=%08x\n\t", M.x86.R_EIP );
-    if (ACCESS_FLAG(F_OF))    printf("OV ");     /* CHECKED... */
-    else                        printf("NV ");
-    if (ACCESS_FLAG(F_DF))    printf("DN ");
-    else                        printf("UP ");
-    if (ACCESS_FLAG(F_IF))    printf("EI ");
-    else                        printf("DI ");
-    if (ACCESS_FLAG(F_SF))    printf("NG ");
-    else                        printf("PL ");
-    if (ACCESS_FLAG(F_ZF))    printf("ZR ");
-    else                        printf("NZ ");
-    if (ACCESS_FLAG(F_AF))    printf("AC ");
-    else                        printf("NA ");
-    if (ACCESS_FLAG(F_PF))    printf("PE ");
-    else                        printf("PO ");
-    if (ACCESS_FLAG(F_CF))    printf("CY ");
-    else                        printf("NC ");
-    printf("\n");
+	printf("\tEAX=%08x  ", M.x86.R_EAX);
+	printf("EBX=%08x  ", M.x86.R_EBX);
+	printf("ECX=%08x  ", M.x86.R_ECX);
+	printf("EDX=%08x\n", M.x86.R_EDX);
+	printf("\tESP=%08x  ", M.x86.R_ESP);
+	printf("EBP=%08x  ", M.x86.R_EBP);
+	printf("ESI=%08x  ", M.x86.R_ESI);
+	printf("EDI=%08x\n", M.x86.R_EDI);
+	printf("\tDS=%04x  ", M.x86.R_DS);
+	printf("ES=%04x  ", M.x86.R_ES);
+	printf("SS=%04x  ", M.x86.R_SS);
+	printf("CS=%04x  ", M.x86.R_CS);
+	printf("EIP=%08x\n\t", M.x86.R_EIP);
+	if (ACCESS_FLAG(F_OF))
+		printf("OV ");	/* CHECKED... */
+	else
+		printf("NV ");
+	if (ACCESS_FLAG(F_DF))
+		printf("DN ");
+	else
+		printf("UP ");
+	if (ACCESS_FLAG(F_IF))
+		printf("EI ");
+	else
+		printf("DI ");
+	if (ACCESS_FLAG(F_SF))
+		printf("NG ");
+	else
+		printf("PL ");
+	if (ACCESS_FLAG(F_ZF))
+		printf("ZR ");
+	else
+		printf("NZ ");
+	if (ACCESS_FLAG(F_AF))
+		printf("AC ");
+	else
+		printf("NA ");
+	if (ACCESS_FLAG(F_PF))
+		printf("PE ");
+	else
+		printf("PO ");
+	if (ACCESS_FLAG(F_CF))
+		printf("CY ");
+	else
+		printf("NC ");
+	printf("\n");
 }

-- 
To view, visit https://review.coreboot.org/26354
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fd57032686de064d3ca6e9323625023eafd646e
Gerrit-Change-Number: 26354
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas at noos.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180517/a4e0a067/attachment-0001.html>


More information about the coreboot-gerrit mailing list