MCPcopy Index your code
hub / github.com/encounter/objdiff / reg_name

Function reg_name

objdiff-core/src/arch/arm64.rs:1940–1961  ·  view source on GitHub ↗
(size: SizeCode, reg: u16, sp: bool)

Source from the content-addressed store, hash-verified

1938];
1939
1940fn reg_name(size: SizeCode, reg: u16, sp: bool) -> &'static str {
1941 match reg.cmp(&31) {
1942 Ordering::Less => match size {
1943 SizeCode::X => REG_NAMES_X[reg as usize],
1944 SizeCode::W => REG_NAMES_W[reg as usize],
1945 },
1946 Ordering::Equal => {
1947 if sp {
1948 match size {
1949 SizeCode::X => "sp",
1950 SizeCode::W => "wsp",
1951 }
1952 } else {
1953 match size {
1954 SizeCode::X => "xzr",
1955 SizeCode::W => "wzr",
1956 }
1957 }
1958 }
1959 Ordering::Greater => "<invalid>",
1960 }
1961}
1962
1963fn shift_style(style: ShiftStyle) -> &'static str {
1964 match style {

Callers 1

push_registerFunction · 0.85

Calls 1

cmpMethod · 0.80

Tested by

no test coverage detected