@@ -123,34 +123,34 @@ void riscv_batch_add_nop(struct riscv_batch *batch)
123123
124124void dump_field (const struct scan_field * field )
125125{
126- static const char * op_string [] = {"-" , "r" , "w" , "?" };
127- static const char * status_string [] = {"+" , "?" , "F" , "b" };
126+ static const char * op_string [] = {"-" , "r" , "w" , "?" };
127+ static const char * status_string [] = {"+" , "?" , "F" , "b" };
128128
129- if (debug_level < LOG_LVL_DEBUG )
130- return ;
129+ if (debug_level < LOG_LVL_DEBUG )
130+ return ;
131131
132132 assert (field -> out_value != NULL );
133- uint64_t out = buf_get_u64 (field -> out_value , 0 , field -> num_bits );
134- unsigned int out_op = get_field (out , DTM_DMI_OP );
135- unsigned int out_data = get_field (out , DTM_DMI_DATA );
136- unsigned int out_address = out >> DTM_DMI_ADDRESS_OFFSET ;
137-
138- if (field -> in_value ) {
139- uint64_t in = buf_get_u64 (field -> in_value , 0 , field -> num_bits );
140- unsigned int in_op = get_field (in , DTM_DMI_OP );
141- unsigned int in_data = get_field (in , DTM_DMI_DATA );
142- unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET ;
143-
144- log_printf_lf (LOG_LVL_DEBUG ,
145- __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ,
146- "%db %s %08x @%02x -> %s %08x @%02x [0x%p -> 0x%p]" ,
147- field -> num_bits ,
148- op_string [out_op ], out_data , out_address ,
149- status_string [in_op ], in_data , in_address ,
133+ uint64_t out = buf_get_u64 (field -> out_value , 0 , field -> num_bits );
134+ unsigned int out_op = get_field (out , DTM_DMI_OP );
135+ unsigned int out_data = get_field (out , DTM_DMI_DATA );
136+ unsigned int out_address = out >> DTM_DMI_ADDRESS_OFFSET ;
137+
138+ if (field -> in_value ) {
139+ uint64_t in = buf_get_u64 (field -> in_value , 0 , field -> num_bits );
140+ unsigned int in_op = get_field (in , DTM_DMI_OP );
141+ unsigned int in_data = get_field (in , DTM_DMI_DATA );
142+ unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET ;
143+
144+ log_printf_lf (LOG_LVL_DEBUG ,
145+ __FILE__ , __LINE__ , __PRETTY_FUNCTION__ ,
146+ "%db %s %08x @%02x -> %s %08x @%02x [0x%p -> 0x%p]" ,
147+ field -> num_bits ,
148+ op_string [out_op ], out_data , out_address ,
149+ status_string [in_op ], in_data , in_address ,
150150 field -> out_value , field -> in_value );
151- } else {
152- log_printf_lf (LOG_LVL_DEBUG ,
153- __FILE__ , __LINE__ , __PRETTY_FUNCTION__ , "%db %s %08x @%02x -> ?" ,
154- field -> num_bits , op_string [out_op ], out_data , out_address );
155- }
151+ } else {
152+ log_printf_lf (LOG_LVL_DEBUG ,
153+ __FILE__ , __LINE__ , __PRETTY_FUNCTION__ , "%db %s %08x @%02x -> ?" ,
154+ field -> num_bits , op_string [out_op ], out_data , out_address );
155+ }
156156}
0 commit comments