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

Operator emit negative values #413

Closed
samphunter opened this issue Apr 2, 2019 · 3 comments
Closed

Operator emit negative values #413

samphunter opened this issue Apr 2, 2019 · 3 comments

Comments

@samphunter
Copy link

samphunter commented Apr 2, 2019

Issue description:

Some emit instructions that should take negative integers don't. For example ADDR.pri -20, LOAD.S.pri -20, STOR.S.pri -20, ...

Minimal complete verifiable example (MCVE):

main() {
	emit STACK -20; // Allocate 5 cells
	emit ADDR.alt -20; // Get address of this array of 5 cells
        emit ZERO.pri;
	emit FILL 20; // Fill it with zeros
	emit STOR.S.pri -20; // Access first element
	emit STACK 20; // Free
}

Workspace Information:

  • Compiler version: 3.10.9
  • Command line arguments provided (or sampctl version): -;+ -(+
  • Operating System: Windows 8.1
@YashasSamaga
Copy link
Member

#emit supports negative values but the emit operator doesn't.

@Daniel-Cortez

@Daniel-Cortez
Copy link
Contributor

Daniel-Cortez commented Apr 14, 2019

Already did the relevant changes locally, I'll probably upload another batch of improvements for emit tomorrow, but again, it would rely on #393 being merged (I wonder what still keeps it from being merged), as I've added a new token (teREFERENCE).

@Daniel-Cortez
Copy link
Contributor

Fixed in #421.

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

No branches or pull requests

3 participants