mirror of
https://github.com/corda/corda.git
synced 2025-01-22 20:38:05 +00:00
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
This commit is contained in:
commit
42622d0d25
@ -501,11 +501,19 @@ void unsignedShiftRightR(Context* con, unsigned size, Reg* a, Reg* b, Reg* t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
moveRR(Context* c, unsigned srcSize, Assembler::Register* src,
|
||||||
|
unsigned dstSize, Assembler::Register* dst);
|
||||||
|
|
||||||
void unsignedShiftRightC(Context* con, unsigned size, Const* a, Reg* b, Reg* t)
|
void unsignedShiftRightC(Context* con, unsigned size, Const* a, Reg* b, Reg* t)
|
||||||
{
|
{
|
||||||
int sh = getVal(a);
|
int sh = getVal(a);
|
||||||
if (size == 8) {
|
if (size == 8) {
|
||||||
if (sh < 32) {
|
if (sh == 32) {
|
||||||
|
Assembler::Register high(b->high);
|
||||||
|
moveRR(con, 4, &high, 4, t);
|
||||||
|
issue(con, li(H(t),0));
|
||||||
|
} else if (sh < 32) {
|
||||||
issue(con, srwi(R(t), R(b), sh));
|
issue(con, srwi(R(t), R(b), sh));
|
||||||
issue(con, rlwimi(R(t),H(b),32-sh,0,sh-1));
|
issue(con, rlwimi(R(t),H(b),32-sh,0,sh-1));
|
||||||
issue(con, rlwinm(H(t),H(b),32-sh,sh,31));
|
issue(con, rlwinm(H(t),H(b),32-sh,sh,31));
|
||||||
@ -596,10 +604,6 @@ jumpR(Context* c, unsigned size UNUSED, Assembler::Register* target)
|
|||||||
issue(c, bctr());
|
issue(c, bctr());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
moveRR(Context* c, unsigned srcSize, Assembler::Register* src,
|
|
||||||
unsigned dstSize, Assembler::Register* dst);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
swapRR(Context* c, unsigned aSize, Assembler::Register* a,
|
swapRR(Context* c, unsigned aSize, Assembler::Register* a,
|
||||||
unsigned bSize, Assembler::Register* b)
|
unsigned bSize, Assembler::Register* b)
|
||||||
|
@ -203,14 +203,14 @@ namespace vm {
|
|||||||
void*
|
void*
|
||||||
resolveNativeMethod(Thread* t, object method)
|
resolveNativeMethod(Thread* t, object method)
|
||||||
{
|
{
|
||||||
void* p = ::resolveNativeMethod(t, method, "Java_", 5, -1);
|
void* p = ::resolveNativeMethod(t, method, "Avian_", 6, 3);
|
||||||
if (p) {
|
if (p) {
|
||||||
|
methodVmFlags(t, method) |= FastNative;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = ::resolveNativeMethod(t, method, "Avian_", 6, 3);
|
p = ::resolveNativeMethod(t, method, "Java_", 5, -1);
|
||||||
if (p) {
|
if (p) {
|
||||||
methodVmFlags(t, method) |= FastNative;
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ public class Longs {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static long unsignedShiftRight32(long x) {
|
||||||
|
return x >>> 32;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
expect(((long) negativeOne()) == -1);
|
expect(((long) negativeOne()) == -1);
|
||||||
|
|
||||||
@ -211,6 +215,8 @@ public class Longs {
|
|||||||
buffer.putLong(231);
|
buffer.putLong(231);
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
expect(buffer.getLong() == 231);
|
expect(buffer.getLong() == 231);
|
||||||
|
|
||||||
|
expect(unsignedShiftRight32(231) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user