You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/rCore/kernel/src/arch/mipsel/interrupt
    
    the code of the file until where you have to start completion: use crate::arch::paging::get_root_page_table_ptr;
use crate::drivers::IRQ_MANAGER;
use crate::process::thread::Thread;
use alloc::sync::Arc;
use log::*;
use mips::addr::*;
use mips::interrupts;
use mips::paging::PageT
    
pub fn handle_reserved_inst(tf: &mut UserContext) -> bool {
    let inst = unsafe { *(tf.epc as *const usize) };

    let opcode = inst >> 26;
    let rt = (inst >> 16) & 0b11111;
    let rd = (inst >> 11) & 0b11111;
    let sel = (inst >> 6) & 0b111;
    let format = inst & 0b111111;

    if inst == 0x42000020 {
        // ignore WAIT
        tf.epc = tf.epc + 4;
        return true;
    }

    if opcode == 0b011111 && format == 0b111011 {
        // RDHWR UserLocal
        if rd == 29 && sel == 0 {
            let tls = tf.tls;

            set_trapframe_register(rt, tls, tf);
            trace!("Read TLS by rdhwr {:x} to register {:?}", tls, rt);
            tf.epc = tf.epc + 4;
            return true;
        } else {
            return false;
        }
    }

    false
}