Skip to content

ltsmin does not compile natively on ARM due to hard coded assembly #232

Description

@mlaveaux

The ltsmin toolset does not claim compatibility with ARM processors, but since I was a bit caught off guard when preparing an artifact that contained ltsmin I thought it would be good to document this somewhere. I used emulation to get around the problem. The issue seems to be some hard coded instructions in atomics.h:

#define mfence() { asm volatile("mfence" ::: "memory"); }
/* Compile read-write barrier */
#define compile_barrier() asm volatile("": : :"memory")
/* Pause instruction to prevent excess processor bus usage */
#define cpu_relax() asm volatile("pause\n": : :"memory")
.

See the compilation errors below:

...
66.24 libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/hre -I../../src -I../../src -I../../lib -I../../lib -g -O2 -W -Wall -pipe -c bitvector-ll.c -o bitvector-ll.o
66.24 libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/hre -I../../src -I../../src -I../../lib -I../../lib -g -O2 -W -Wall -pipe -c cctables.c -o cctables.o
66.25 libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/hre -I../../src -I../../src -I../../lib -I../../lib -g -O2 -W -Wall -pipe -c clt_table.c -o clt_table.o
66.25 libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/hre -I../../src -I../../src -I../../lib -I../../lib -g -O2 -W -Wall -pipe -c dbs-ll.c -o dbs-ll.o
66.28 {standard input}: Assembler messages:
66.28 {standard input}:272: Error: unknown mnemonic `pause' -- `pause'
66.28 {standard input}:387: Error: unknown mnemonic `pause' -- `pause'
66.28 {standard input}:654: Error: unknown mnemonic `pause' -- `pause'
66.28 make[2]: *** [Makefile:1672: cctables.lo] Error 1
66.28 make[2]: *** Waiting for unfinished jobs....
66.31 {standard input}: Assembler messages:
66.31 {standard input}:651: Error: unknown mnemonic `mfence' -- `mfence'
66.32 make[2]: Leaving directory '/root/ltsmin/src/mc-lib'
66.32 make[2]: *** [Makefile:1672: clt_table.lo] Error 1
66.32 make[1]: *** [Makefile:1669: install-recursive] Error 1
66.32 make[1]: Leaving directory '/root/ltsmin/src'
66.32 make: *** [Makefile:1750: install-recursive] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions