Liste des Groupes | Revenir à c arch |
On 3/7/2025 9:28 PM, MitchAlsup1 wrote:Not bad.On Sat, 8 Mar 2025 2:49:50 +0000, BGB wrote:>
>
------------------------>>
I guess, while a person could do something like (in C):
_BitInt(1048576) bmp;
_Boolean b;
...
b=(bmp>>i)&1; //*blarg* (shift here would be absurdly expensive)
>
This is liklely to be rare vs more traditional strategies, say:
uint64_t *bmp;
int b, i;
...
b=(bmp[i>>6]>>(i&63))&1;
Question: How do you handle the case where the bit vector is an odd
number of bits in width ?? Say <3, 5, 7, 17, ...>
>
It is rare for bitmap bits to not be a power of 2...
>
I would guess, at least for C, something like (for 3 bits):
uint32_t *bmp;
uint64_t bv;
int i, b, bp;
...
bp=i*3;
bv=*(uint64_t *)(bmp+(bp>>5));
b=(bv>>(bp&31))&7;
>
Could apply to anything up to 31 bits.
Could do similar with __int128 (or uint128_t), which extends it up to 63------------
bits.
My 66000 has CARRY-SL/SR which performs a double wide operand shiftedMc 68020 had instructions to access bit-fields that cross word>
boundaries.
>
I guess one could argue the use-case for adding a generic funnel shift
instruction.
If I added it, it would probably be a 64-bit encoding (generally neededBy placing the width in position {31..37} you can compress this down
for 4R).
Clearly, you want to support C semantics--but you can do this in a wayArchitecture is more about what gets left OUT than what gets left IN.>
Well, except in this case it was more a question of trying to fit it in
with C semantics (and not consideration for more ISA features).
There are still some limitations, for example:<y 66000 only has 8 CPU CRs, and even these are R/W through MMI/O
In my current implementation, CSR's are very limited (may only be used
to load and store CSRs; not do RMW operations on CSRs).
Though, have noted that seemingly some number of actual RISC-V coresMy 66000::
also have this limitation.
>
>
A more drastic option might be to try to rework the hardware interfaces
and memory map hopefully enough to try to make it possible to run an OS
like Linux, but there doesn't really seem to be a standardized set of
hardware interfaces or memory map defined.
>
Some amount of SOC's though seem to use a map like:
00000000..0000FFFF: ROM goes here.
00010000..0XXXXXXX: RAM goes here.
ZXXXXXXX..FFFFFFFF: Hardware / MMIO
They seem to also be asking for a UEFI based boot process, but thisBoot ROM should be big enough that no BOOT ROM will ever exceed its
would require having a bigger BootROM (can't likely fit a UEFI
implementation into 32K). Seems that the idea is to have the UEFI BIOS
boot the kernel directly as an ELF image (traditionally UEFI was always
PE/COFF based?...).
There is a probable need to move away from the "BJX2" name, which asHilarious--and reason enough to change names.
noted, has some unfortunate connotations (turns out it was also used for
a lewd act) and seems to be triggering to Google's automatic content
filtering (probably for a similar reason).
Les messages affichés proviennent d'usenet.