pcmp Operation Font Conventions
if
(PR[qp]) {
check_target_register;
if (one_byte_form) { // one-byte elements
x[0] = GR[r2]{7:0};
y[0] = GR[r3]{7:0};
x[1] = GR[r2]{15:8}; y[1] = GR[r3]{15:8};
x[2] = GR[r2]{23:16}; y[2] = GR[r3]{23:16};
x[3] = GR[r2]{31:24}; y[3] = GR[r3]{31:24};
x[4] = GR[r2]{39:32}; y[4] = GR[r3]{39:32};
x[5] = GR[r2]{47:40}; y[5] = GR[r3]{47:40};
x[6] = GR[r2]{55:48}; y[6] = GR[r3]{55:48};
x[7] = GR[r2]{63:56}; y[7] = GR[r3]{63:56};
for (i = 0; i < 8; i++) {
if (prel == ‘eq')
tmp_rel = x[i] == y[i];
else // ‘gt'
tmp_rel = greater_signed(sign_ext(x[i], 8), sign_ext(y[i], 8));
if (tmp_rel)
res[i] = 0xff;
else // ‘gt'
res[i] = 0x00;
}
GR[r1] = concatenate8(res[7],
res[6], res[5], res[4],
res[3], res[2], res[1], res[0]);
} else if (two_byte_form) { // two-byte elements
x[0] = GR[r2]{15:0}; y[0] = GR[r3]{15:0};
x[1] = GR[r2]{31:16}; y[1] = GR[r3]{31:16};
x[2] = GR[r2]{47:32}; y[2] = GR[r3]{47:32};
x[3] = GR[r2]{63:48}; y[3] = GR[r3]{63:48};
for (i = 0; i < 4; i++) {
if (prel == ‘eq')
tmp_rel = x[i] == y[i];
else // ‘gt'
tmp_rel = greater_signed(sign_ext(x[i],
16), sign_ext(y[i], 16));
if (tmp_rel)
res[i] = 0xffff;
else
res[i] = 0x0000;
}
GR[r1] = concatenate4(res[3],
res[2], res[1], res[0]);
} else { // four-byte elements
x[0] = GR[r2]{31:0}; y[0] = GR[r3]{31:0};
x[1] = GR[r2]{63:32}; y[1] = GR[r3]{63:32};
for (i = 0; i < 2; i++) {
if (prel == ‘eq')
tmp_rel = x[i] == y[i];
else
tmp_rel = greater_signed(sign_ext(x[i], 32), sign_ext(y[i], 32));
if (tmp_rel)
res[i] = 0xffffffff;
else
res[i] = 0x00000000;
}
GR[r1] = concatenate2(res[1],
res[0]);
}
GR[r1].nat = GR[r2].nat || GR[r3].nat;
}