Closed bluestar628 closed 1 week ago
Hey!
Thank you for the detailed report and giving wtf a shot 🙏🏽
I am guessing you are seeing the above with 'latest' Bochs? Because I believe bxcpu uses a set of patches on top of the Bochs sources which means you need to make sure it applies to the right version; in https://github.com/yrp604/bochscpu-build you can see the branch 2.7 / release 2.7; both of those tracks the version 2.7 of Bochs.
Also, I've have never seen those linking errors before (related to softfloat); are you adding softfloat or this is stock Bochs?
Also adding @yrp604 (the author of bxcpu) as he might have encountered this / might have ideas.
Sorry for all the dumb questions!
Cheers
I can take a look at this next week. In he meantime I’d suggest trying the version pinned to 2.7 as Axel suggested!
Thanks for your response, I will try the version 2.7 now
Hi, I tracked it down. Softfloat is now built with the FPU lib of bochs and for some reason OBJS_SPECIALIZE
are NOT built on windows, but still declared as part of ALL_OBJS
in bochs/cpu/softfloat3e/Makefile.in
I changed line 266 from
OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
to
@NMAKE_ONLY@OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_OTHERS)
@GNU_MAKE_ONLY@OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
edit: looks like bochscpu needs those specialized functions, so the above won't work. need to figure out why the objs in the 8086-SSE dir are not being compiled.
Additionally, it looks like we disable SMP in the configure script, but SMP is required for APIC support (for some reason). We can patch that out too and it seems ok. I'm making changes to bochscpu-build, bochscpu, and wtf as part of #213 so once that is done this issue should be solved.
fyi... softfloat3e.lib aka libsoftfloat.a can be found under bochs/cpu/softfloat3e/libsoftfloat.a after the bochscpu-build step.
need to figure out why the objs in the 8086-SSE dir are not being compiled.
"Since one of the MSVC nmake rules uses curly brackets the shortcut script .conf.win64-vcpp needs to be modified to exclude cpu/softfloat3e/Makefile from removal of these usually unwanted characters."
I see, it's this bit you were referring to
@NMAKE_ONLY@{8086-SSE\}.c.o:
@NMAKE_ONLY@ $(COMPILE_C) /Tp$<
I have been away traveling for a while but I am back and catching up on issues filed on Github; sorry for that!
@bluestar628 did the above help you fix your issue? Or you are still stuck? I am trying to figure out how I could help or if this should be closed.
Cheers
Apologies for the delayed response. The issue has been resolved by reverting to an older version of the code. I appreciate all the assistance provided. Thank you!
No worries at all - are you happy if I close this?
Cheers
I am ok with that, thanks again!
---- Replied Message ---- | From | Axel @.> | | Date | 11/04/2024 08:45 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [0vercl0k/wtf] Compilation Issues with bochscpu and SoftFloat-3e (Issue #212) |
No worries at all - are you happy if I close this?
Cheers
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Of course - feel free to re-open if you want a hand in the future anyways :)
Cheers
I hope this message finds you well. I am currently working on a project that involves the bochscpu crate and the SoftFloat-3e library, and I have encountered a couple of issues during the compilation process. I would greatly appreciate your assistance in resolving these problems.
Firstly, I noticed that the field names of the Bit64u struct have been changed in the latest version of the library. Specifically, the fraction and exp fields have been renamed to signif and signExp, respectively. To address this, I have made the necessary modifications to the bochscpu/cabi/cpu-cabi.cc file, as shown below:
Secondly, after applying the above changes, the compilation process is failing during the linking stage while executing the build-bochscpu.bat script. I have observed several error messages related to unresolved symbols from the SoftFloat-3e library, such as f16_add, f16_sub, f16_mul, f16_mulAdd, f16_div, f16_min, f16_max, f16_getExp, and f16_sqrt. It appears that the project is unable to link against the compiled SoftFloat-3e library (softfloat3e.lib). However, I have been unable to locate the softfloat3e.lib file in the project directory, and I suspect that the file name may have been changed.
I would be immensely grateful if you could provide guidance on how to resolve these linking issues and ensure that the project successfully links against the SoftFloat-3e library. Thank you in advance for your time and assistance. I am eager to resolve these compilation issues as I need to debug the backends to find what's wrong with my snapshot so that it is trapped into nt!KiPageFaultShadow+0x5 after executing the first instruction, "mov [rsp-8+arg_0], rcx" as I am sure that the rsp is valid.
Compilation error message: