From 4f891db39c9caf5cb65af972411b5812342b7ea4 Mon Sep 17 00:00:00 2001 From: Wilko Nienhaus Date: Thu, 29 Jul 2021 21:31:00 +0300 Subject: [PATCH] support .int data type .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) --- esp32_ulp/assemble.py | 5 +++++ tests/compat/fixes.S | 3 +++ 2 files changed, 8 insertions(+) diff --git a/esp32_ulp/assemble.py b/esp32_ulp/assemble.py index ebebb46..9038cdf 100644 --- a/esp32_ulp/assemble.py +++ b/esp32_ulp/assemble.py @@ -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): diff --git a/tests/compat/fixes.S b/tests/compat/fixes.S index 022951a..9e4d0ef 100644 --- a/tests/compat/fixes.S +++ b/tests/compat/fixes.S @@ -12,6 +12,9 @@ counter: .long 0 +.data +var2: .int 1111 + .text .global entry entry: