Skip to content

Commit

Permalink
A
Browse files Browse the repository at this point in the history
test case for PA structure_size_boundary and partial demo of cross
compilation, at least to assembly

You can see the resulting struct sizes in the assembly.

The other part of the cross-use is m3cc/src/buildmany.sh
and a config file change that lets you specify cc/as/ld on the cm3
command line, or at least as.
  • Loading branch information
jaykrell committed Aug 16, 2015
1 parent bd1ff63 commit e5d73c8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
21 changes: 21 additions & 0 deletions m3-sys/m3tests/src/p2/p262/Main.m3
@@ -0,0 +1,21 @@
(* Test the correctness of Structure_size_boundary = 16 for PA32_HPUX, PA64_HPUX.
I think it is wrong. *)

MODULE Main;

TYPE T1 = RECORD a: CHAR END;

PROCEDURE F1(<*UNUSED*>a:INTEGER) =
BEGIN
END F1;

PROCEDURE F2() =
BEGIN
F1(16_123);
F1(123);
F1(BYTESIZE(T1));
END F2;

BEGIN
F2();
END Main.
7 changes: 7 additions & 0 deletions m3-sys/m3tests/src/p2/p262/m3makefile
@@ -0,0 +1,7 @@
% Test the correctness of Structure_size_boundary = 16 for PA32_HPUX, PA64_HPUX.
% I think it is wrong.

m3back_optimize = ""
implementation("Main")
build_standalone()
include ("../../Test.common")
1 change: 1 addition & 0 deletions m3-sys/m3tests/src/p2/p262/m3overrides
@@ -0,0 +1 @@
include(ROOT & "/m3overrides")
11 changes: 11 additions & 0 deletions m3-sys/m3tests/src/p2/p262/p262.sh
@@ -0,0 +1,11 @@
#!/bin/sh

set -ex
/cm3/bin/cm3 \
-DROOT=/dev2/cm3 \
-DTARGET=PA64_HPUX \
-DSYSTEM_AS=$HOME/hppa64-hpux11/bin/hppa64-hpux11-as \
-keep \
-boot \
-x \
$@

0 comments on commit e5d73c8

Please sign in to comment.