Skip to content

Commit

Permalink
support .int data type
Browse files Browse the repository at this point in the history
.long and .int are the same as per GNU assembler manual:
https://sourceware.org/binutils/docs/as/Long.html

binutils-esp32ulp also treats them the same (compat test included
to verify this)
  • Loading branch information
wnienhaus committed Jul 31, 2021
1 parent 1b2517a commit 4f891db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions esp32_ulp/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ def d_word(self, *args):
self.append_data(2, args)

def d_long(self, *args):
self.d_int(args)

def d_int(self, *args):
# .long and .int are identical as per GNU assembler documentation
# https://sourceware.org/binutils/docs/as/Long.html
self.append_data(4, args)

def assembler_pass(self, lines):
Expand Down
3 changes: 3 additions & 0 deletions tests/compat/fixes.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
counter:
.long 0

.data
var2: .int 1111

.text
.global entry
entry:
Expand Down

0 comments on commit 4f891db

Please sign in to comment.