]> granicus.if.org Git - yasm/commitdiff
Tests for define with parameters.
authorMichael Urman <mu@tortall.net>
Mon, 18 Mar 2002 03:02:54 +0000 (03:02 -0000)
committerMichael Urman <mu@tortall.net>
Mon, 18 Mar 2002 03:02:54 +0000 (03:02 -0000)
svn path=/trunk/yasm/; revision=523

modules/preprocs/yapp/Makefile.inc
modules/preprocs/yapp/tests/params.asm [new file with mode: 0644]
modules/preprocs/yapp/tests/params.pre [new file with mode: 0644]
modules/preprocs/yapp/tests/pdefine.asm [new file with mode: 0644]
modules/preprocs/yapp/tests/pdefine.pre [new file with mode: 0644]
src/preprocs/yapp/Makefile.inc
src/preprocs/yapp/tests/params.asm [new file with mode: 0644]
src/preprocs/yapp/tests/params.pre [new file with mode: 0644]
src/preprocs/yapp/tests/pdefine.asm [new file with mode: 0644]
src/preprocs/yapp/tests/pdefine.pre [new file with mode: 0644]

index 8e301dc8117753aa09df9f4105e8f076322299f8..7231436e26b78c01ecfc89db3d3eb8c0bf3f77bb 100644 (file)
@@ -26,12 +26,16 @@ EXTRA_DIST += \
        src/preprocs/yapp/tests/ddefine.pre \
        src/preprocs/yapp/tests/rdefine.asm \
        src/preprocs/yapp/tests/rdefine.pre \
+       src/preprocs/yapp/tests/pdefine.asm \
+       src/preprocs/yapp/tests/pdefine.pre \
        src/preprocs/yapp/tests/ifdef.asm \
        src/preprocs/yapp/tests/ifdef.pre \
        src/preprocs/yapp/tests/include.asm \
        src/preprocs/yapp/tests/include.pre \
        src/preprocs/yapp/tests/rinclude.asm \
-       src/preprocs/yapp/tests/rinclude.pre
+       src/preprocs/yapp/tests/rinclude.pre \
+       src/preprocs/yapp/tests/params.asm \
+       src/preprocs/yapp/tests/params.pre
 
 CLEANFILES += \
        raw.yp \
@@ -39,7 +43,9 @@ CLEANFILES += \
        define.yp \
        ddefine.yp \
        rdefine.yp \
+       pdefine.yp \
        ifdef.yp \
        include.yp \
-       rinclude.yp
+       rinclude.yp \
+       params.yp
 
diff --git a/modules/preprocs/yapp/tests/params.asm b/modules/preprocs/yapp/tests/params.asm
new file mode 100644 (file)
index 0000000..046775e
--- /dev/null
@@ -0,0 +1,2 @@
+%define foo(a, b) (a)+(b)
+    foo((a+b,c),(d*e,f))
diff --git a/modules/preprocs/yapp/tests/params.pre b/modules/preprocs/yapp/tests/params.pre
new file mode 100644 (file)
index 0000000..2826a66
--- /dev/null
@@ -0,0 +1,2 @@
+%line 2+1 ./src/preprocs/yapp/tests/params.asm
+    ((a+b,c))+((d*e,f))
diff --git a/modules/preprocs/yapp/tests/pdefine.asm b/modules/preprocs/yapp/tests/pdefine.asm
new file mode 100644 (file)
index 0000000..ebde922
--- /dev/null
@@ -0,0 +1,6 @@
+%define foo(bar) bar+1
+%define foo(bar, baz) bar-baz
+       mov     ax, foo
+       mov     ax, foo(5)
+       mov     ax, foo(5, 3)
+       mov     ax, foo(5, 6, 7)
diff --git a/modules/preprocs/yapp/tests/pdefine.pre b/modules/preprocs/yapp/tests/pdefine.pre
new file mode 100644 (file)
index 0000000..0054ee8
--- /dev/null
@@ -0,0 +1,5 @@
+%line 3+1 ./src/preprocs/yapp/tests/pdefine.asm
+       mov     ax, foo
+       mov     ax, 5+1
+       mov     ax, 5-3
+       mov     ax, foo(5, 6, 7)
index 8e301dc8117753aa09df9f4105e8f076322299f8..7231436e26b78c01ecfc89db3d3eb8c0bf3f77bb 100644 (file)
@@ -26,12 +26,16 @@ EXTRA_DIST += \
        src/preprocs/yapp/tests/ddefine.pre \
        src/preprocs/yapp/tests/rdefine.asm \
        src/preprocs/yapp/tests/rdefine.pre \
+       src/preprocs/yapp/tests/pdefine.asm \
+       src/preprocs/yapp/tests/pdefine.pre \
        src/preprocs/yapp/tests/ifdef.asm \
        src/preprocs/yapp/tests/ifdef.pre \
        src/preprocs/yapp/tests/include.asm \
        src/preprocs/yapp/tests/include.pre \
        src/preprocs/yapp/tests/rinclude.asm \
-       src/preprocs/yapp/tests/rinclude.pre
+       src/preprocs/yapp/tests/rinclude.pre \
+       src/preprocs/yapp/tests/params.asm \
+       src/preprocs/yapp/tests/params.pre
 
 CLEANFILES += \
        raw.yp \
@@ -39,7 +43,9 @@ CLEANFILES += \
        define.yp \
        ddefine.yp \
        rdefine.yp \
+       pdefine.yp \
        ifdef.yp \
        include.yp \
-       rinclude.yp
+       rinclude.yp \
+       params.yp
 
diff --git a/src/preprocs/yapp/tests/params.asm b/src/preprocs/yapp/tests/params.asm
new file mode 100644 (file)
index 0000000..046775e
--- /dev/null
@@ -0,0 +1,2 @@
+%define foo(a, b) (a)+(b)
+    foo((a+b,c),(d*e,f))
diff --git a/src/preprocs/yapp/tests/params.pre b/src/preprocs/yapp/tests/params.pre
new file mode 100644 (file)
index 0000000..2826a66
--- /dev/null
@@ -0,0 +1,2 @@
+%line 2+1 ./src/preprocs/yapp/tests/params.asm
+    ((a+b,c))+((d*e,f))
diff --git a/src/preprocs/yapp/tests/pdefine.asm b/src/preprocs/yapp/tests/pdefine.asm
new file mode 100644 (file)
index 0000000..ebde922
--- /dev/null
@@ -0,0 +1,6 @@
+%define foo(bar) bar+1
+%define foo(bar, baz) bar-baz
+       mov     ax, foo
+       mov     ax, foo(5)
+       mov     ax, foo(5, 3)
+       mov     ax, foo(5, 6, 7)
diff --git a/src/preprocs/yapp/tests/pdefine.pre b/src/preprocs/yapp/tests/pdefine.pre
new file mode 100644 (file)
index 0000000..0054ee8
--- /dev/null
@@ -0,0 +1,5 @@
+%line 3+1 ./src/preprocs/yapp/tests/pdefine.asm
+       mov     ax, foo
+       mov     ax, 5+1
+       mov     ax, 5-3
+       mov     ax, foo(5, 6, 7)