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

Add const string literals #517

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Add const string literals #517

merged 2 commits into from
Jul 12, 2023

Conversation

Rixxc
Copy link
Contributor

@Rixxc Rixxc commented Jul 12, 2023

This pull requests adds the basic ability to define u8 arrays by ascii strings, as requested by #510.

@Rixxc
Copy link
Contributor Author

Rixxc commented Jul 12, 2023

I'm not 100% confident in my changes to compiler/src/latex_printer.ml.

The resulting assembly code from the test file is:

	.att_syntax
	.text
	.p2align	5
	.globl	_main
	.globl	main
_main:
main:
	movb	$84, %al
	movb	glob_data + 0(%rip), %cl
	xorb	%cl, %al
	ret 
	.data
	.p2align	5
_glob_data:
glob_data:
      .byte 84
      .byte 101
      .byte 115
      .byte 116
      .byte 115
      .byte 116
      .byte 114
      .byte 105
      .byte 110
      .byte 103

@vbgl
Copy link
Member

vbgl commented Jul 12, 2023

Thanks for your contribution. I took the liberty to add a few words in the CHANGELOG, add a test for ARM, and clean a bit the LATEX printer.

@vbgl
Copy link
Member

vbgl commented Jul 12, 2023

Also, you may want to add your name in the AUTHORS file.

@Rixxc
Copy link
Contributor Author

Rixxc commented Jul 12, 2023

I have added myself to AUTHORS. Thank you.

@vbgl vbgl merged commit f142e7b into jasmin-lang:main Jul 12, 2023
vbgl pushed a commit that referenced this pull request Jul 24, 2023
* Add const string literals

* Add Aaron Kaiser to AUTHORS

(cherry picked from commit f142e7b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants