Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
multiprecision.hh File Reference

Multi-precision integers. More...

#include "error.hh"
Include dependency graph for multiprecision.hh:

Functions

void ghidra::leftshift128 (uint8 *in, uint8 *out, int4 sa)
 128-bit INT_LEFT operation with constant shift amount
 
bool ghidra::uless128 (uint8 *in1, uint8 *in2)
 128-bit INT_LESS operation
 
bool ghidra::ulessequal128 (uint8 *in1, uint8 *in2)
 128-bit INT_LESSEQUAL operation
 
void ghidra::udiv128 (uint8 *numer, uint8 *denom, uint8 *quotient_res, uint8 *remainder_res)
 128-bit INT_DIV
 
void ghidra::add128 (uint8 *in1, uint8 *in2, uint8 *out)
 128-bit INT_ADD operation
 
void ghidra::subtract128 (uint8 *in1, uint8 *in2, uint8 *out)
 128-bit INT_SUB operation
 
void ghidra::set_u128 (uint8 *res, uint8 val)
 Set a 128-bit value (2 64-bit words) from a 64-bit value.
 

Detailed Description

Multi-precision integers.

Function Documentation

◆ add128()

void ghidra::add128 ( uint8 *  in1,
uint8 *  in2,
uint8 *  out 
)

128-bit INT_ADD operation

Parameters
in1is the first 128-bit value (as 2 64-bit words) to add
in2is the second 128-bit value to add
outwill hold the 128-bit result

◆ leftshift128()

void ghidra::leftshift128 ( uint8 *  in,
uint8 *  out,
int4  sa 
)

128-bit INT_LEFT operation with constant shift amount

Parameters
inis the 128-bit input (as 2 64-bit words)
outwill hold the 128-bit result
sais the number of bits to shift

◆ set_u128()

void ghidra::set_u128 ( uint8 *  res,
uint8  val 
)
inline

Set a 128-bit value (2 64-bit words) from a 64-bit value.

Parameters
reswill hold the 128-bit value
valis the 64-bit value to set from

References ghidra::set_u128().

Referenced by ghidra::RuleDivTermAdd::applyOp(), ghidra::RuleDivTermAdd2::applyOp(), ghidra::RuleDivOpt::calcDivisor(), and ghidra::set_u128().

◆ subtract128()

void ghidra::subtract128 ( uint8 *  in1,
uint8 *  in2,
uint8 *  out 
)

128-bit INT_SUB operation

Parameters
in1is the first 128-bit value (as 2 64-bit words)
in2is the second 128-bit value to subtract
outwill hold the 128-bit result

◆ udiv128()

void ghidra::udiv128 ( uint8 *  numer,
uint8 *  denom,
uint8 *  quotient_res,
uint8 *  remainder_res 
)

128-bit INT_DIV

Parameters
numerholds the 2 64-bit words of the numerator
denomholds the 2 words of the denominator
quotient_reswill hold the 2 words of the quotient
remainder_reswill hold the 2 words of the remainder

◆ uless128()

bool ghidra::uless128 ( uint8 *  in1,
uint8 *  in2 
)

128-bit INT_LESS operation

Parameters
in1is the first 128-bit value (as 2 64-bit words) to compare
in2is the second 128-bit value
Returns
true if the first value is less than the second value

◆ ulessequal128()

bool ghidra::ulessequal128 ( uint8 *  in1,
uint8 *  in2 
)

128-bit INT_LESSEQUAL operation

Parameters
in1is the first 128-bit value (as 2 64-bit words) to compare
in2is the second 128-bit value
Returns
true if the first value is less than or equal to the second value