SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
237 stars 89 forks source link

vstore16/vfetch16 & CSWAP128 #654

Closed salva-rczero closed 3 months ago

salva-rczero commented 3 months ago

Quadword store/fetch family of functions adapted from @Fish-Git's swap128 sample code.

I am not very sure of its completeness. Especially for non-Intel 64 architectures. I'm also not sure if it would compile on Linux. But I preferred to upload it so that other users can start testing it and I can continue to provide the code for the zvector instructions.

Regards, salva.

salva-rczero commented 3 months ago

@Fish-Git Would you please consider this pull request. Right now, I have some divergence between repositories and to move forward without hindering @mcisho or @JamesWekel, I would want to consolidate the changes.

Fish-Git commented 3 months ago

@Fish-Git Would you please consider this pull request. Right now, I have some divergence between repositories and to move forward without hindering @mcisho or @JamesWekel, I would want to consolidate the changes.

It doesn't compile cleanly on Linux:

In file included from hexdumpe.c:16:
In file included from ./hercules.h:78:
./esa390.h:75:23: error: field has incomplete type 'U128' (aka 'union __m128i')
./htypes.h:112:15: note: forward declaration of 'union __m128i'
salva-rczero commented 3 months ago

I'm really stuck in byteswap includes logic. Will continue tomorrow. Thanks, @Fish-Git.

salva-rczero commented 3 months ago

@Fish-Git I finally got it compile in linux. I placed bswap_128 at inline.h. Not sure if it is the best place.

Fish-Git commented 3 months ago

@Fish-Git I finally got it compile in linux. I placed bswap_128 at inline.h. Not sure if it is the best place.

Whatever works!

salva-rczero commented 3 months ago

@Fish-Git Cosmetic pushed!

Thank you, I am very honored by your offer, but I think I am still far from deserving it. For 40 years I have been a 100% mainframer and I still find it hard to manage in other development environments.

Regards, salva.

p.d. Do you use a styling tool or are you doing it manually?

Fish-Git commented 3 months ago

Do you use a styling tool or are you doing it manually?

Manually. My style is not always consistent. There are exceptions to my usual style, depending on the function's code context.

Fish-Git commented 3 months ago

Why didn't you apply my cosmetic patch AS-IS?! (with no changes?)

It looks like you manually applied my proposed cosmetic (style) changes yourself. And you did many of them wrong, and missed many others. Why didn't you simply apply them normally? (i.e. via the patch command?)

salva-rczero commented 3 months ago

I applied with the patch cmd, but it failed for zvector.c because it was updated after the PR.

Don't worry, I'll fix the style for the next PR.

Thanks.

Fish-Git commented 3 months ago

Don't worry, I'll fix the style for the next PR.

Too late for that. Your changes have already been merged into Herc's sharedvfp branch, which now doesn't build.  :(

But I guess that's partially my fault. I failed to review your changes before accepting them. I simply presumed your last commit applied my changes as-is.

Please do me a favor and next time, if my proposed patch fails to apply cleanly, let me know and I'll make the needed adjustments. Okay?

In return, I'll be more careful and be sure to more closely review your coding changes in your Pull Requests to make sure something like this doesn't happen again. Fair?

p.s. Something else that is probably my fault for not telling you (and I should have known better due to my knowing that you are relatively new to C and GitHub and applying patches, etc) is that my patches were done on my Windows system, which means it won't apply cleanly on Linux due to the difference in line endings (CRLF on Windows and just LF on Linux). Thus, it comes as no surprise that the patch failed to apply cleanly is you tried applying it on Linux.

Before applying one of my patches on Linux, you need to do dos2unix on it beforehand, to fix the line endings. If you apply the patch on Windows, you don't need to do that. Again, that was my mistake for not telling you about that. I apologize for that. I'm getting forgetful in my old age, forgetting how inexperienced you are. Please forgive me.

salva-rczero commented 3 months ago

@Fish-Git Thank you for your comments. I will try to be more careful in the future.

I use Window to develop, compile & test. Also I have a Ubuntu docker to test Linux compilation.

My local repo is synchronized with Hyperion sharedvfp branch, and it compiles OK for me on Windows & Linux. Can you share your compiler error messages?

Thanks in advance.

Fish-Git commented 3 months ago

My local repo is synchronized with Hyperion sharedvfp branch, and it compiles OK for me on Windows & Linux.

This is almost certainly because you are using a modern version of Visual Studio, such as VS2019 or VS2022, etc, which support later versions of the C standard. I, however, am still using VS2008, which uses a much older version of Microsoft's C compiler, which does not support the same set of C standards. Most notably, it is a C99 compiler, which does not support declaring variables anywhere you want. Instead, you must declare all of your local variables at the beginning of the function.

I have been involved with Hercules development for the past 20+ years or more (almost 25), and the minimum required compiler support has always been controversial. I, like Roger Bowler, the original creator of Hercules, feel it is better to target requirements to the lowest common denominator rather than to too quickly jump on the latest bandwagon and adopt the newest and shiniest version/standard of something.

If you start changing your code to adopt the new stuff, then people still using the old stuff are left out in the cold, and are unable to contribute. But if you stick with the old as your minimum, then both camps are happy: the old still works and so does the new. Newer versions of compilers should not cause older code to not compile. It should still compile the old code just fine. The only time it won't, is if you begin trying to utilize features that the new supports but which the old does not.

And IMHO there is no feature of the newer compilers that provides and real benefit to Hercules. Being able to declare a variable anywhere instead of only at the beginning certainly doesn't make Hercules any faster. All it does is make Hercules incompatible with older compilers! (leaving some people, such as myself, out in the cold).

Fish-Git commented 3 months ago

I have done performance comparisons of Hercules built with VS2008 as compared with Hercules built using VS2022, and there is no measurable improvement in performance. None.

If someone could tell me which features of the newer C standard would definitely improve Hercules's performance if used/leveraged, I would gladly perform another comparison. If, that is, they can show me where in Hercules code such new incompatible features should be used. (Being "Old School", I am admittedly unfamiliar with the newer C language standards.)

Fish-Git commented 3 months ago

In other words. I defy anyone to offer a modified version of Hercules that uses/leverages these new incompatible C standards/features that improves Hercules's performance in any significantly (or even semi-significantly!) measurable way.

Fish-Git commented 3 months ago

Can you share your compiler error messages?

[...]
1>build_pch.c
1>Target platform: WINNT_VISTA (0x0600)
1>hsys.c
1>   Creating library msvc.debug.AMD64.obj\hsys.lib and object msvc.debug.AMD64.obj\hsys.exp
1>codepage.c
1>fthreads.c
1>getopt.c
1>hdl.c
1>hostinfo.c
1>hscutl.c
1>hexdumpe.c
1>logger.c
1>logmsg.c
1>memrchr.c
1>parser.c
1>hthreads.c
1>pttrace.c
1>version.c
1>hsocket.c
1>w32util.c
1>   Creating library msvc.debug.AMD64.obj\hutil.lib and object msvc.debug.AMD64.obj\hutil.exp
1>cache.c
1>cckddasd.c
1>cckdutil.c
1>ckddasd.c
1>cckddasd64.c
1>cckdutil64.c
1>ckddasd64.c
1>dasdtab.c
1>dasdutil.c
1>fbadasd.c
1>dasdutil64.c
1>fbadasd64.c
1>shared.c
1>   Creating library msvc.debug.AMD64.obj\hdasd.lib and object msvc.debug.AMD64.obj\hdasd.exp
1>hetlib.c
1>ftlib.c
1>sllib.c
1>w32stape.c
1>   Creating library msvc.debug.AMD64.obj\htape.lib and object msvc.debug.AMD64.obj\htape.exp
1>archlvl.c
1>assist.c
1>bldcfg.c
1>script.c
1>cgibin.c
1>channel.c
1>chsc.c
1>clock.c
1>cmdtab.c
1>cmpsc_2012.c
1>cmpscdbg.c
1>cmpscdct.c
1>cmpscget.c
1>cmpscmem.c
1>cmpscput.c
1>config.c
1>control.c
1>cpu.c
1>crypto.c
1>dat.c
1>decimal.c
1>dfp.c
1>diagmssf.c
1>diagnose.c
1>dyn76.c
1>ecpsvm.c
1>esame.c
1>external.c
1>facility.c
1>fillfnam.c
1>float.c
1>general1.c
1>general2.c
1>general3.c
1>hbyteswp.c
1>hconsole.c
1>hdiagf18.c
1>history.c
1>hsccmd.c
1>hscemode.c
1>hscpufun.c
1>hscloc.c
1>hao.c
1>hscmisc.c
1>httpserv.c
1>ieee.c
1>impl.c
1>inline.c
1>io.c
1>ipl.c
1>loadmem.c
1>loadparm.c
1>losc.c
1>machchk.c
1>machdep.c
1>opcode.c
1>panel.c
1>pfpo.c
1>plo.c
1>qdio.c
1>mpc.c
1>hRexx.c
1>hRexx_o.c
1>hRexx_r.c
1>service.c
1>scedasd.c
1>scescsi.c
1>sie.c
1>skey.c
1>sr.c
1>stack.c
1>tcpip.c
1>timer.c
1>trace.c
1>transact.c
1>vector.c
1>vm.c
1>vmd250.c
1>vstore.c
1>x75.c
1>xstore.c
1>zvector.c
1>w32ctca.c
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(206) : error C2275: 'U64' : illegal use of this type as an expression
1>        c:\...(trimmed)...\hyperion-salva-sharedvfp-0\htypes.h(111) : see declaration of 'U64'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(206) : error C2146: syntax error : missing ';' before identifier 'boundary'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(206) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(208) : error C2275: 'U64' : illegal use of this type as an expression
1>        c:\...(trimmed)...\hyperion-salva-sharedvfp-0\htypes.h(111) : see declaration of 'U64'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(208) : error C2146: syntax error : missing ';' before identifier 'nextbound'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(208) : error C2065: 'nextbound' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(208) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(208) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(209) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(210) : error C2065: 'length' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2065: 'length' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(212) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(491) : error C2275: 'U64' : illegal use of this type as an expression
1>        c:\...(trimmed)...\hyperion-salva-sharedvfp-0\htypes.h(111) : see declaration of 'U64'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(491) : error C2146: syntax error : missing ';' before identifier 'boundary'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(491) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(493) : error C2275: 'U64' : illegal use of this type as an expression
1>        c:\...(trimmed)...\hyperion-salva-sharedvfp-0\htypes.h(111) : see declaration of 'U64'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(493) : error C2146: syntax error : missing ';' before identifier 'nextbound'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(493) : error C2065: 'nextbound' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(493) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(493) : error C2065: 'boundary' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(494) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(496) : error C2065: 'length' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(497) : error C2065: 'length' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(513) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(517) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(518) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(519) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(519) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(519) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(519) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(522) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(523) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(524) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(524) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(524) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(524) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(527) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(528) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(529) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(529) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(529) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(529) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(532) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(533) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(534) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(534) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(534) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(534) : error C2065: 'shift' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(555) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(559) : error C2065: 'rotl' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(560) : error C2065: 'rotr' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(560) : error C2065: 'rotl' : undeclared identifier
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2143: syntax error : missing ';' before 'type'
1>Stop.
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2143: syntax error : missing ')' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2143: syntax error : missing ';' before 'type'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : warning C4552: '<' : operator has no effect; expected operator with side-effect
1>makefile.bat ended on Tue 05/07/2024 at 15:46:10.15, rc=2
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(561) : error C2059: syntax error : ')'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2146: syntax error : missing ';' before identifier 'regs'
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2065: 'rotl' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2065: 'i' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(562) : error C2065: 'rotr' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(565) : error C2065: 'rotl' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(566) : error C2065: 'rotr' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(566) : error C2065: 'rotl' : undeclared identifier
1>c:\...(trimmed)...\hyperion-salva-sharedvfp-0\zvector.c(566) : fatal error C1003: error count exceeds 100; stopping compilation
1>Build Time 0:09
1>Build log was saved at "file://c:\...(trimmed)...\hyperion-salva-sharedvfp-0\msvc.debug.AMD64.bin\BuildLog-x64-Debug.htm"
1>Hercules_VS2008 - 103 error(s), 6 warning(s)

1>Hercules_VS2008 - 103 error(s), 6 warning(s)

Solution Build ended at 5/7/2024 3:46:10 PM
Solution Build duration 00:00:10
salva-rczero commented 3 months ago

@Fish-Git The line numbers of the errors do not match my source. Are you using last sharevfp branch commit?

Thanks for the info. I will need some way to test different configurations and environments: c99, ARM, ... any documentation? is anyone using github Actions?

Fish-Git commented 3 months ago

@Fish-Git The line numbers of the errors do not match my source. Are you using last sharevfp branch commit?

No. I was building the sharedvfp branch of your repository (https://github.com/salva-rczero/hyperion-sharedvfp/tree/sharedvfp) as it looked immediately after you made yesterday's "Fish styles patch" commit, which I failed to closely review and which I then merged into the sharedvfp branch of Hercules's repository.

That commit of yours is what generated all of the errors you see above, and was what caused me to then have to make followup commits to Hercules's repository in order to fix the mess.

Fish-Git commented 3 months ago

I see you made several new commits since then, and am happy to report that your repository now build cleanly! Thank you! Let's hope it stays that way.  ;-)

salva-rczero commented 3 months ago

Great!

wrljet commented 3 months ago

@Fish-Git The line numbers of the errors do not match my source. Are you using last sharevfp branch commit?

Thanks for the info. I will need some way to test different configurations and environments: c99, ARM, ... any documentation? is anyone using github Actions?

I have been working on and off (mostly off) on GitHub Actions and it's almost ready to be checked into Jay's Aethra repo. After that I plan to bring it up with Fish and see if he wants to run it as well in SDL. Basically it just does a build and packages up the results on every commit.

It does Windows (creates zipped up EXEs), x86_64 Ubuntu (creates a .DEB), x86_64 macOS (creates one of their packages), and several flavors of Rasp Pi for ARM (.DEBs). Note that GitHub actions doesn't offer ARM runners, so I'm doing those with QEMU. They take about 40 minutes to run.

Bill

Fish-Git commented 3 months ago

Basically it just does a build and packages up the results on every commit.

Does it have to be after every commit? Can the rebuild be triggered by, say, time? Such as only once per day/week, etc? I only ask since rebuilding after every commit seems like overkill to me. Not every commit really deserves a rebuild after all.

wrljet commented 3 months ago

Fish, the sky's the limit. Very configurable / script-able. You just have to know how to drive it (which I barely do).

wrljet commented 3 months ago

Fish, et. al, here's an example of what I creates as "assets" currently.

image

wrljet commented 3 months ago

Fish,

I have done performance comparisons of Hercules built with VS2008 as compared with Hercules built using VS2022, and there is no measurable improvement in performance. None.

If someone could tell me which features of the newer C standard would definitely improve Hercules's performance if used/leveraged, I would gladly perform another comparison. If, that is, they can show me where in Hercules code such new incompatible features should be used. (Being "Old School", I am admittedly unfamiliar with the newer C language standards.)

For what it's worth, my casual testing, also, shows next to no improvement between VS2008 compiled Hercules and VS2002.

That said, it's time to drop a long out-of-support compiler.

There are among our "customers" who are starting to not trust binaries built with obsolete tools, on an obsolete unpatched OS.

This is one reason for the GitHub Actions builds.

Bill

Fish-Git commented 3 months ago

That said, it's time to drop a long out-of-support compiler.

What does dropped support have to do with it? Are you arguing that products that are no longer officially supported by a vendor are somehow broken? That they suddenly no longer work just as well as they did when they were officially supported? That as soon as official support is dropped that they no longer work well? That they begin working LESS well?

That seems to be a rather silly argument, don't you think?

There are among our "customers" who are starting to not trust binaries built with obsolete tools, on an obsolete unpatched OS.

Well you can just explain to those customers that their reasoning is highly flawed. A given older product that still runs just fine today as it did when it was still supported will continue to run just as well on an older operating system as it will on newer ones.

And then ask them how the frick they can tell whether the operating system that Hercules is being built on is missing any patches or has any security vulnerabilities.

And THEN ask them what vulnerability it is that taints the output produced by a compiler.

And THEN ask them how the frick they can tell a Hercules built using a more modern compiler on a more modern operating system ISN'T impacted by the same vulnerability.

And then after you tell them all that, tell them if they don't like it, to build it for themselves for crying out loud and to shut the fuck up about it.

Sheesh.

Fish-Git commented 3 months ago

And then point them to VirusTotal:

if they're so worried about builds of Hercules that are in their opinion "built dangerously" and thus are a security concern (which seems to be their argument).

wrljet commented 3 months ago

salva

If we're voting, you should definitely / totally, accept the fact that you're in the top echelon of Hercules developers.

Bill

Fish-Git commented 3 months ago

And you can also ask those who don't trust builds of Hercules that are built using older unsupported compilers on older unsupported operating systems how they can tell the difference between builds of Hercules that are built on fully patched offline systems with no network connection and one that was built on one that wasn't.