Lines Matching refs:bits

25     let mut bits = 0;  in encode_r_type_bits()  localVariable
26 bits |= unsigned_field_width(opcode, 7); in encode_r_type_bits()
27 bits |= unsigned_field_width(rd, 5) << 7; in encode_r_type_bits()
28 bits |= unsigned_field_width(funct3, 3) << 12; in encode_r_type_bits()
29 bits |= unsigned_field_width(rs1, 5) << 15; in encode_r_type_bits()
30 bits |= unsigned_field_width(rs2, 5) << 20; in encode_r_type_bits()
31 bits |= unsigned_field_width(funct7, 7) << 25; in encode_r_type_bits()
32 bits in encode_r_type_bits()
58 let mut bits = 0; in encode_i_type_bits() localVariable
59 bits |= unsigned_field_width(opcode, 7); in encode_i_type_bits()
60 bits |= unsigned_field_width(rd, 5) << 7; in encode_i_type_bits()
61 bits |= unsigned_field_width(funct3, 3) << 12; in encode_i_type_bits()
62 bits |= unsigned_field_width(rs1, 5) << 15; in encode_i_type_bits()
63 bits |= unsigned_field_width(offset, 12) << 20; in encode_i_type_bits()
64 bits in encode_i_type_bits()
74 offset.bits(), in encode_i_type()
84 let mut bits = 0; in encode_s_type() localVariable
85 bits |= unsigned_field_width(opcode, 7); in encode_s_type()
86 bits |= (offset.bits() & 0b11111) << 7; in encode_s_type()
87 bits |= unsigned_field_width(width, 3) << 12; in encode_s_type()
88 bits |= reg_to_gpr_num(base) << 15; in encode_s_type()
89 bits |= reg_to_gpr_num(src) << 20; in encode_s_type()
90 bits |= unsigned_field_width(offset.bits() >> 5, 7) << 25; in encode_s_type()
91 bits in encode_s_type()
145 let imm = imm.bits() as u32; in encode_valu_rr_imm()
182 let imm = imm.bits() as u32; in encode_valu_rrr_imm()
222 let vs1 = imm.bits() as u32; in encode_valu_r_imm()
240 let mut bits = 0; in encode_vcfg_imm() localVariable
241 bits |= unsigned_field_width(opcode, 7); in encode_vcfg_imm()
242 bits |= reg_to_gpr_num(rd) << 7; in encode_vcfg_imm()
243 bits |= VecOpCategory::OPCFG.encode() << 12; in encode_vcfg_imm()
244 bits |= unsigned_field_width(imm.bits(), 5) << 15; in encode_vcfg_imm()
245 bits |= unsigned_field_width(vtype.encode(), 10) << 20; in encode_vcfg_imm()
246 bits |= 0b11 << 30; in encode_vcfg_imm()
247 bits in encode_vcfg_imm()
272 let mut bits = 0; in encode_vmem_load() localVariable
273 bits |= unsigned_field_width(opcode, 7); in encode_vmem_load()
274 bits |= reg_to_gpr_num(vd) << 7; in encode_vmem_load()
275 bits |= width << 12; in encode_vmem_load()
276 bits |= reg_to_gpr_num(rs1) << 15; in encode_vmem_load()
277 bits |= unsigned_field_width(lumop, 5) << 20; in encode_vmem_load()
278 bits |= masking.encode() << 25; in encode_vmem_load()
279 bits |= unsigned_field_width(mop, 2) << 26; in encode_vmem_load()
283 bits |= 0b0 << 28; in encode_vmem_load()
285 bits |= unsigned_field_width(nf, 3) << 29; in encode_vmem_load()
286 bits in encode_vmem_load()
311 encode_i_type(op.opcode(), rd, op.funct3(), rs, csr.bits()) in encode_csr_reg()
321 imm.bits(), in encode_csr_imm()
322 csr.bits().bits(), in encode_csr_imm()
331 let mut bits = 0; in encode_cr_type() localVariable
332 bits |= unsigned_field_width(op.op().bits(), 2); in encode_cr_type()
333 bits |= reg_to_gpr_num(rs2) << 2; in encode_cr_type()
334 bits |= reg_to_gpr_num(rd.to_reg()) << 7; in encode_cr_type()
335 bits |= unsigned_field_width(op.funct4(), 4) << 12; in encode_cr_type()
336 bits.try_into().unwrap() in encode_cr_type()
352 let mut bits = 0; in encode_ca_type() localVariable
353 bits |= unsigned_field_width(op.op().bits(), 2); in encode_ca_type()
354 bits |= reg_to_compressed_gpr_num(rs2) << 2; in encode_ca_type()
355 bits |= unsigned_field_width(op.funct2(), 2) << 5; in encode_ca_type()
356 bits |= reg_to_compressed_gpr_num(rd.to_reg()) << 7; in encode_ca_type()
357 bits |= unsigned_field_width(op.funct6(), 6) << 10; in encode_ca_type()
358 bits.try_into().unwrap() in encode_ca_type()
368 let imm = imm.bits(); in encode_cj_type()
383 let mut bits = 0; in encode_cj_type() localVariable
384 bits |= unsigned_field_width(op.op().bits(), 2); in encode_cj_type()
385 bits |= unsigned_field_width(imm_field, 11) << 2; in encode_cj_type()
386 bits |= unsigned_field_width(op.funct3(), 3) << 13; in encode_cj_type()
387 bits.try_into().unwrap() in encode_cj_type()
397 let imm = imm.bits(); in encode_ci_type()
399 let mut bits = 0; in encode_ci_type() localVariable
400 bits |= unsigned_field_width(op.op().bits(), 2); in encode_ci_type()
401 bits |= unsigned_field_width((imm & 0x1f) as u32, 5) << 2; in encode_ci_type()
402 bits |= reg_to_gpr_num(rd.to_reg()) << 7; in encode_ci_type()
403 bits |= unsigned_field_width(((imm >> 5) & 1) as u32, 1) << 12; in encode_ci_type()
404 bits |= unsigned_field_width(op.funct3(), 3) << 13; in encode_ci_type()
405 bits.try_into().unwrap() in encode_ci_type()
411 let imm = imm.bits(); in encode_ci_sp_load()
445 let imm = imm.bits(); in encode_c_addi16sp()
471 let mut bits = 0; in encode_ciw_type() localVariable
472 bits |= unsigned_field_width(op.op().bits(), 2); in encode_ciw_type()
473 bits |= reg_to_compressed_gpr_num(rd.to_reg()) << 2; in encode_ciw_type()
474 bits |= unsigned_field_width(imm_field as u32, 8) << 5; in encode_ciw_type()
475 bits |= unsigned_field_width(op.funct3(), 3) << 13; in encode_ciw_type()
476 bits.try_into().unwrap() in encode_ciw_type()
486 let imm = imm.bits(); in encode_cb_type()
488 let mut bits = 0; in encode_cb_type() localVariable
489 bits |= unsigned_field_width(op.op().bits(), 2); in encode_cb_type()
490 bits |= unsigned_field_width((imm & 0x1f) as u32, 5) << 2; in encode_cb_type()
491 bits |= reg_to_compressed_gpr_num(rd.to_reg()) << 7; in encode_cb_type()
492 bits |= unsigned_field_width(op.funct2(), 2) << 10; in encode_cb_type()
493 bits |= unsigned_field_width(((imm >> 5) & 1) as u32, 1) << 12; in encode_cb_type()
494 bits |= unsigned_field_width(op.funct3(), 3) << 13; in encode_cb_type()
495 bits.try_into().unwrap() in encode_cb_type()
505 let imm = imm.bits(); in encode_css_type()
525 let mut bits = 0; in encode_css_type() localVariable
526 bits |= unsigned_field_width(op.op().bits(), 2); in encode_css_type()
527 bits |= reg_to_gpr_num(src) << 2; in encode_css_type()
528 bits |= unsigned_field_width(enc_imm as u32, 6) << 7; in encode_css_type()
529 bits |= unsigned_field_width(op.funct3(), 3) << 13; in encode_css_type()
530 bits.try_into().unwrap() in encode_css_type()
575 let imm = imm.bits(); in encode_cs_cl_type_bits()
595 let mut bits = 0; in encode_cs_cl_type_bits() localVariable
596 bits |= unsigned_field_width(op.bits(), 2); in encode_cs_cl_type_bits()
597 bits |= reg_to_compressed_gpr_num(dest_src) << 2; in encode_cs_cl_type_bits()
598 bits |= unsigned_field_width(imm2 as u32, 2) << 5; in encode_cs_cl_type_bits()
599 bits |= reg_to_compressed_gpr_num(base) << 7; in encode_cs_cl_type_bits()
600 bits |= unsigned_field_width(imm3 as u32, 3) << 10; in encode_cs_cl_type_bits()
601 bits |= unsigned_field_width(funct3, 3) << 13; in encode_cs_cl_type_bits()
602 bits.try_into().unwrap() in encode_cs_cl_type_bits()
612 let mut bits = 0; in encode_cszn_type() localVariable
613 bits |= unsigned_field_width(op.op().bits(), 2); in encode_cszn_type()
614 bits |= unsigned_field_width(op.funct5(), 5) << 2; in encode_cszn_type()
615 bits |= reg_to_compressed_gpr_num(rd.to_reg()) << 7; in encode_cszn_type()
616 bits |= unsigned_field_width(op.funct6(), 6) << 10; in encode_cszn_type()
617 bits.try_into().unwrap() in encode_cszn_type()
625 let imm = imm.bits(); in encode_zcbmem_bits()
639 let mut bits = 0; in encode_zcbmem_bits() localVariable
640 bits |= unsigned_field_width(op.op().bits(), 2); in encode_zcbmem_bits()
641 bits |= reg_to_compressed_gpr_num(dest_src) << 2; in encode_zcbmem_bits()
642 bits |= unsigned_field_width(imm as u32, 2) << 5; in encode_zcbmem_bits()
643 bits |= reg_to_compressed_gpr_num(base) << 7; in encode_zcbmem_bits()
644 bits |= unsigned_field_width(op.funct6(), 6) << 10; in encode_zcbmem_bits()
645 bits.try_into().unwrap() in encode_zcbmem_bits()
663 let mut bits = 0; in encode_fli() localVariable
664 bits |= unsigned_field_width(op.opcode(), 7); in encode_fli()
665 bits |= reg_to_gpr_num(rd.to_reg()) << 7; in encode_fli()
666 bits |= unsigned_field_width(frm, 3) << 12; in encode_fli()
667 bits |= unsigned_field_width(imm.bits() as u32, 5) << 15; in encode_fli()
668 bits |= unsigned_field_width(rs2, 6) << 20; in encode_fli()
669 bits |= unsigned_field_width(op.funct7(width), 7) << 25; in encode_fli()
670 bits in encode_fli()