Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More QC opcodes #236

Closed
divVerent opened this issue Jan 3, 2025 · 2 comments · Fixed by #237
Closed

More QC opcodes #236

divVerent opened this issue Jan 3, 2025 · 2 comments · Fixed by #237

Comments

@divVerent
Copy link
Contributor

  • OP_DIV_U (and other _U operations)
  • OP_RSHIFT_* and OP_LSHIFT_*

These should all be straightforward and uncontroversial to add, so let's just do it. Reference impl in FTEQW.

@Baker7
Copy link

Baker7 commented Jan 3, 2025

  • OP_DIV_U (and other _U operations)

    • OP_RSHIFT_* and OP_LSHIFT_*

These should all be straightforward and uncontroversial to add, so let's just do it. Reference impl in FTEQW.

I noticed you did fte pointer commits and numerous other VM upgrades with and I am excited about those changes.

Are you aware of sample code for fte pointers (and will these changes allow some form of dynamic arrays?).

I would be more than happy to test out the new VM capabilities in the coming weeks, if I can determine exactly how to write the QC to get the engine to do it. I use https://icculus.org/~marco/quakec/fteqcc_manual.txt largely as a reference and the Xonotic QuakeC source, those fteqcc docs talk about pointers but no examples.

@divVerent
Copy link
Contributor Author

divVerent commented Jan 3, 2025

Are you aware of sample code for fte pointers (and will these changes allow some form of dynamic arrays?).

It works with regular FTEQCC and handles fixed size arrays. These changes do NOT provide yet any way for dynamic memory allocation - I did "reserve" some "address space" for that purpose for the future, but that part is not done yet.

Currently you can use a #pragma to enable any opcode you want for your code base - that is how I tested the previously added opcodes. See #215 (comment) for how to enable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants