FAQ
I seems that C_PBIT in 5a means "P bit in instruction is set: pre
indexing mode":

".U", LS, C_UBIT,
".S", LS, C_SBIT,
".W", LS, C_WBIT,
".P", LS, C_PBIT,
".PW", LS, C_WBIT|C_PBIT,
".WP", LS, C_WBIT|C_PBIT,

".F", LS, C_FBIT,

".IBW", LS, C_WBIT|C_PBIT|C_UBIT,
".IAW", LS, C_WBIT|C_UBIT,
".DBW", LS, C_WBIT|C_PBIT,
".DAW", LS, C_WBIT,
".IB", LS, C_PBIT|C_UBIT,
".IA", LS, C_UBIT,
".DB", LS, C_PBIT,
".DA", LS, 0,

But in 5l, 5c and 5g C_PBIT has opposite meaning:

int32
olr(int32 v, int b, int r, int sc)
{
int32 o;

if(sc & C_SBIT)
diag(".S on LDR/STR instruction");
o = (sc & C_SCOND) << 28;
if(!(sc & C_PBIT))
o |= 1 << 24;
if(!(sc & C_UBIT))
o |= 1 << 23;
if(sc & C_WBIT)
o |= 1 << 21;
o |= (1<<26) | (1<<20);
if(v < 0) {
if(sc & C_UBIT) diag(".U on neg offset");
v = -v;
o ^= 1 << 23;
}
if(v >= (1<<12) || v < 0)
diag("literal span too large: %d (R%d)\n%P", v, b, PP);
o |= v;
o |= b << 16;
o |= r << 12;
return o;
}

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 16 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 2, '12 at 8:36p
activeNov 8, '12 at 9:03p
posts16
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase