@@ -129,17 +129,15 @@ where
129129 per_cpu. stats . hint_used += 1 ;
130130 idx
131131 }
132- None => {
133- match tb_find ( shared, per_cpu, cpu, pc, flags) {
134- Some ( idx) => idx,
135- None => {
136- if cpu. check_mem_fault ( ) {
137- continue ;
138- }
139- return ExitReason :: BufferFull ;
132+ None => match tb_find ( shared, per_cpu, cpu, pc, flags) {
133+ Some ( idx) => idx,
134+ None => {
135+ if cpu. check_mem_fault ( ) {
136+ continue ;
140137 }
138+ return ExitReason :: BufferFull ;
141139 }
142- }
140+ } ,
143141 } ;
144142
145143 // GDB breakpoint within TB: if the found TB
@@ -149,14 +147,9 @@ where
149147 // boundary. The original TB stays in cache for
150148 // non-debug execution (QEMU cflags approach).
151149 let tb = shared. tb_store . get ( idx) ;
152- if cpu. gdb_breakpoint_in_tb (
153- tb. pc ,
154- tb. size as u64 ,
155- ) {
150+ if cpu. gdb_breakpoint_in_tb ( tb. pc , tb. size as u64 ) {
156151 let cf = CF_SINGLE_STEP | 1 ;
157- match tb_gen_code_cflags (
158- shared, per_cpu, cpu, pc, flags, cf,
159- ) {
152+ match tb_gen_code_cflags ( shared, per_cpu, cpu, pc, flags, cf) {
160153 Some ( ss_idx) => ss_idx,
161154 None => {
162155 if cpu. check_mem_fault ( ) {
@@ -318,8 +311,7 @@ where
318311 // Illegal: TSR trap or U-mode sret.
319312 // PC points to next insn; rewind to
320313 // the sret itself for mepc.
321- let cur =
322- cpu. get_pc ( ) . wrapping_sub ( 4 ) ;
314+ let cur = cpu. get_pc ( ) . wrapping_sub ( 4 ) ;
323315 cpu. set_pc ( cur) ;
324316 cpu. handle_exception ( 2 , 0 ) ;
325317 }
@@ -341,10 +333,7 @@ where
341333 cpu. tlb_flush ( ) ;
342334 shared
343335 . tb_store
344- . invalidate_all (
345- shared. code_buf ( ) ,
346- & shared. backend ,
347- ) ;
336+ . invalidate_all ( shared. code_buf ( ) , & shared. backend ) ;
348337 per_cpu. jump_cache . invalidate ( ) ;
349338 next_tb_hint = None ;
350339 }
@@ -498,8 +487,7 @@ where
498487 if let Some ( idx) = per_cpu. jump_cache . lookup ( pc) {
499488 let tb = shared. tb_store . get ( idx) ;
500489 if !tb. invalid . load ( Ordering :: Acquire )
501- && tb. gen . load ( Ordering :: Acquire )
502- == shared. tb_store . global_gen ( )
490+ && tb. gen . load ( Ordering :: Acquire ) == shared. tb_store . global_gen ( )
503491 && tb. pc == pc
504492 && tb. flags == flags
505493 && ( cur_phys == u64:: MAX || tb. phys_pc == cur_phys)
0 commit comments