mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
format recent changes using clang-format
This commit is contained in:
parent
e3f50e6d67
commit
cdcf173601
@ -125,8 +125,7 @@ void nextFrame(ArchitectureContext* con,
|
||||
|
||||
// check for post-non-tail-call stack adjustment of the form "sub
|
||||
// sp, sp, #offset":
|
||||
if (TargetBytesPerWord == 8 and (*instruction & 0xff0003ff) == 0xd10003ff)
|
||||
{
|
||||
if (TargetBytesPerWord == 8 and (*instruction & 0xff0003ff) == 0xd10003ff) {
|
||||
unsigned value = (*instruction >> 10) & 0xfff;
|
||||
unsigned shift = (*instruction >> 22) & 1;
|
||||
switch (shift) {
|
||||
|
@ -44,8 +44,7 @@ int64_t OffsetPromise::value()
|
||||
assertT(con, resolved());
|
||||
|
||||
unsigned o = offset - block->offset;
|
||||
return block->start
|
||||
+ padding(block, forTrace ? o - InstructionSize : o) + o;
|
||||
return block->start + padding(block, forTrace ? o - InstructionSize : o) + o;
|
||||
}
|
||||
|
||||
Promise* offsetPromise(Context* con, bool forTrace)
|
||||
|
@ -854,26 +854,8 @@ void load(Context* con,
|
||||
case 8: {
|
||||
if (dstSize == 8) {
|
||||
lir::RegisterPair dstHigh(dst->high);
|
||||
load(con,
|
||||
4,
|
||||
base,
|
||||
offset,
|
||||
NoRegister,
|
||||
1,
|
||||
4,
|
||||
&dstHigh,
|
||||
false,
|
||||
false);
|
||||
load(con,
|
||||
4,
|
||||
base,
|
||||
offset + 4,
|
||||
NoRegister,
|
||||
1,
|
||||
4,
|
||||
dst,
|
||||
false,
|
||||
false);
|
||||
load(con, 4, base, offset, NoRegister, 1, 4, &dstHigh, false, false);
|
||||
load(con, 4, base, offset + 4, NoRegister, 1, 4, dst, false, false);
|
||||
} else {
|
||||
emit(con, ldri(dst->low, base, offset));
|
||||
}
|
||||
@ -1407,7 +1389,8 @@ void longJumpC(Context* con, unsigned size UNUSED, lir::Constant* target)
|
||||
{
|
||||
assertT(con, size == vm::TargetBytesPerWord);
|
||||
|
||||
lir::RegisterPair tmp(Register(4)); // a non-arg reg that we don't mind clobbering
|
||||
lir::RegisterPair tmp(
|
||||
Register(4)); // a non-arg reg that we don't mind clobbering
|
||||
moveCR2(con, vm::TargetBytesPerWord, target, &tmp, offsetPromise(con));
|
||||
jumpR(con, vm::TargetBytesPerWord, &tmp);
|
||||
}
|
||||
|
@ -38,17 +38,20 @@ void append(Context* c, uint32_t instruction)
|
||||
|
||||
uint32_t lslv(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x9ac02000 : 0x1ac02000) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x9ac02000 : 0x1ac02000) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t ubfm(Register Rd, Register Rn, int r, int s, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xd3400000 : 0x53000000) | (r << 16) | (s << 10) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0xd3400000 : 0x53000000) | (r << 16) | (s << 10)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t sbfm(Register Rd, Register Rn, int r, int s, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x93400000 : 0x13000000) | (r << 16) | (s << 10) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x93400000 : 0x13000000) | (r << 16) | (s << 10)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t lsli(Register Rd, Register Rn, int shift, unsigned size)
|
||||
@ -62,12 +65,14 @@ uint32_t lsli(Register Rd, Register Rn, int shift, unsigned size)
|
||||
|
||||
uint32_t asrv(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x9ac02800 : 0x1ac02800) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x9ac02800 : 0x1ac02800) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t lsrv(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x9ac02400 : 0x1ac02400) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x9ac02400 : 0x1ac02400) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t lsri(Register Rd, Register Rn, int shift, unsigned size)
|
||||
@ -122,7 +127,8 @@ uint32_t fmovFdRn(Register Fd, Register Rn, unsigned size)
|
||||
|
||||
uint32_t orr(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xaa000000 : 0x2a000000) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0xaa000000 : 0x2a000000) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t addi(Register Rd, Register Rn, int value, int shift, unsigned size)
|
||||
@ -163,12 +169,14 @@ uint32_t ldrPCRel(Register Rd, int offset, unsigned size)
|
||||
|
||||
uint32_t add(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x8b000000 : 0x0b000000) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x8b000000 : 0x0b000000) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t sub(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xcb000000 : 0x4b000000) | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0xcb000000 : 0x4b000000) | (Rm.index() << 16)
|
||||
| (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t and_(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
@ -185,8 +193,8 @@ uint32_t eor(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
|
||||
uint32_t madd(Register Rd, Register Rn, Register Rm, Register Ra, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0x9b000000 : 0x1b000000)
|
||||
| (Rm.index() << 16) | (Ra.index() << 10) | (Rn.index() << 5) | Rd.index();
|
||||
return (size == 8 ? 0x9b000000 : 0x1b000000) | (Rm.index() << 16)
|
||||
| (Ra.index() << 10) | (Rn.index() << 5) | Rd.index();
|
||||
}
|
||||
|
||||
uint32_t mul(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
@ -288,7 +296,8 @@ uint32_t strh(Register Rs, Register Rn, Register Rm)
|
||||
uint32_t striFs(Register Fs, Register Rn, int offset, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xfd000000 : 0xbd000000)
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) | Fs.index();
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5)
|
||||
| Fs.index();
|
||||
}
|
||||
|
||||
uint32_t str(Register Rs, Register Rn, Register Rm, unsigned size)
|
||||
@ -310,7 +319,8 @@ uint32_t strhi(Register Rs, Register Rn, int offset)
|
||||
uint32_t stri(Register Rs, Register Rn, int offset, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xf9000000 : 0xb9000000)
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) | Rs.index();
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5)
|
||||
| Rs.index();
|
||||
}
|
||||
|
||||
uint32_t ldrFd(Register Fd, Register Rn, Register Rm, unsigned size)
|
||||
@ -353,7 +363,8 @@ uint32_t ldr(Register Rd, Register Rn, Register Rm, unsigned size)
|
||||
uint32_t ldriFd(Register Fd, Register Rn, int offset, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xfd400000 : 0xbd400000)
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) | Fd.index();
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5)
|
||||
| Fd.index();
|
||||
}
|
||||
|
||||
uint32_t ldrbi(Register Rd, Register Rn, int offset)
|
||||
@ -384,7 +395,8 @@ uint32_t ldrswi(Register Rd, Register Rn, int offset)
|
||||
uint32_t ldri(Register Rd, Register Rn, int offset, unsigned size)
|
||||
{
|
||||
return (size == 8 ? 0xf9400000 : 0xb9400000)
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) | Rd.index();
|
||||
| ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5)
|
||||
| Rd.index();
|
||||
}
|
||||
|
||||
uint32_t fcmp(Register Fn, Register Fm, unsigned size)
|
||||
@ -1272,8 +1284,9 @@ void moveAR(Context* c,
|
||||
unsigned dstSize,
|
||||
lir::RegisterPair* dst)
|
||||
{
|
||||
assertT(c, srcSize == vm::TargetBytesPerWord
|
||||
and dstSize == vm::TargetBytesPerWord);
|
||||
assertT(
|
||||
c,
|
||||
srcSize == vm::TargetBytesPerWord and dstSize == vm::TargetBytesPerWord);
|
||||
|
||||
lir::Constant constant(src->address);
|
||||
moveCR(c, srcSize, &constant, dstSize, dst);
|
||||
@ -1288,7 +1301,7 @@ void compareRR(Context* c,
|
||||
unsigned bSize UNUSED,
|
||||
lir::RegisterPair* b)
|
||||
{
|
||||
assertT(c, not (isFpr(a) xor isFpr(b)));
|
||||
assertT(c, not(isFpr(a) xor isFpr(b)));
|
||||
assertT(c, aSize == bSize);
|
||||
|
||||
if (isFpr(a)) {
|
||||
|
Loading…
Reference in New Issue
Block a user