Skip to content

Commit

Permalink
Working on getting XG3 working in VL core
Browse files Browse the repository at this point in the history
Trying to get XG3 fully working in the VL core...
  • Loading branch information
cr88192 committed Jan 21, 2025
1 parent d1664c2 commit 4b8c228
Show file tree
Hide file tree
Showing 44 changed files with 2,436 additions and 1,584 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*.db-shm
*.db-wal
*.ipch
*.vsidx
*.lock

randbits.txt

Expand Down
Binary file modified bgbcc22/bgbcc.exe
Binary file not shown.
2,094 changes: 1,048 additions & 1,046 deletions bgbcc22/include/bgbcc_auto.h

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions bgbcc22/include/bgbcc_shcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,13 @@
#define BGBCC_SH_NMID_FCMPLE 0x0296 //
#define BGBCC_SH_NMID_PCMPLEF 0x0297 //

#define BGBCC_SH_NMID_CSRRW 0x0298 //
#define BGBCC_SH_NMID_CSRRS 0x0299 //
#define BGBCC_SH_NMID_CSRRC 0x029A //
#define BGBCC_SH_NMID_CSRRWI 0x029B //
#define BGBCC_SH_NMID_CSRRSI 0x029C //
#define BGBCC_SH_NMID_CSRRCI 0x029D //


#define BGBCC_SH_NMID_MOVZT BGBCC_SH_NMID_MOVTT
#define BGBCC_SH_NMID_XMOVZT BGBCC_SH_NMID_XMOVTT
Expand Down
8 changes: 8 additions & 0 deletions bgbcc22/jx2cc/jx2_bufasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,14 @@ int mfl;
{"remu", BGBCC_SH_NMID_MODUQ, 2},
{"remuw", BGBCC_SH_NMID_MODUL, 2},

{"csrrw", BGBCC_SH_NMID_CSRRW, 2},
{"csrrs", BGBCC_SH_NMID_CSRRS, 2},
{"csrrc", BGBCC_SH_NMID_CSRRC, 2},
{"csrrwi", BGBCC_SH_NMID_CSRRWI, 2},
{"csrrsi", BGBCC_SH_NMID_CSRRSI, 2},
{"csrrci", BGBCC_SH_NMID_CSRRCI, 2},


{"fadd.d", BGBCC_SH_NMID_FADD, 0},
{"fsub.d", BGBCC_SH_NMID_FSUB, 0},
{"fmul.d", BGBCC_SH_NMID_FMUL, 0},
Expand Down
12 changes: 11 additions & 1 deletion bgbcc22/jx2cc/jx2_cgif.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,14 @@ ccxl_status BGBCC_JX2C_SetupContextForArch(BGBCC_TransState *ctx)

if(ctx->imgfmt==BGBCC_IMGFMT_SYS)
{
shctx->is_pbo=0;
if(shctx->emit_riscv&0x11)
{
shctx->is_pbo=3;
}
else
{
shctx->is_pbo=0;
}
}

BGBPP_AddStaticDefine(NULL, "__jx2__", "");
Expand Down Expand Up @@ -7460,6 +7467,9 @@ ccxl_status BGBCC_JX2C_FlattenImage(BGBCC_TransState *ctx,
if(imgfmt==BGBCC_IMGFMT_ROM)
{
sctx->is_pbo=0; //PBO is N/A for ROM images.
if(sctx->emit_riscv&0x11)
sctx->is_pbo=3; //Except in the case of RISC-V...

sctx->is_rom=1;
sctx->lbl_rom_data_strt=
BGBCC_JX2_GetNamedLabel(sctx, "__rom_data_start");
Expand Down
Loading

0 comments on commit 4b8c228

Please sign in to comment.