[PATCH] D42576: [test-suite] Add prototypes to functions in Olden and MiBench

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 06:00:49 PST 2018


arichardson created this revision.
arichardson added a reviewer: MatzeB.
Herald added subscribers: hintonda, mgorny.

When calling a function without a prototype it gets called using the
variadic calling convention. For a small number of arguments this is
usually the same as calling a non-variadic function. However, on
architectures such as CHERI the variadic and non-variadic calling
conventions use different registers (even for less than 4 arguments) and
therefore the code will crash at runtime.

This change is required in order to run the test suite on CHERI (and
possibly other architectures that have different variadic and non-variadic
calling conventions). It also allows compiling this code with
-Werror=strict-prototypes, which is currently the default on the
CI for CHERI in order to avoid these runtime crashes.


Repository:
  rT test-suite

https://reviews.llvm.org/D42576

Files:
  MultiSource/Benchmarks/MiBench/automotive-bitcount/conio.h
  MultiSource/Benchmarks/MiBench/automotive-susan/susan.c
  MultiSource/Benchmarks/MiBench/consumer-lame/lame.c
  MultiSource/Benchmarks/MiBench/consumer-typeset/externs.h
  MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt
  MultiSource/Benchmarks/MiBench/office-ispell/term.c
  MultiSource/Benchmarks/MiBench/security-blowfish/bftest.c
  MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.c
  MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.h
  MultiSource/Benchmarks/Olden/bh/defs.h
  MultiSource/Benchmarks/Olden/bh/newbh.c
  MultiSource/Benchmarks/Olden/bh/stdinc.h
  MultiSource/Benchmarks/Olden/bh/util.c
  MultiSource/Benchmarks/Olden/bisort/proc.h
  MultiSource/Benchmarks/Olden/em3d/make_graph.c
  MultiSource/Benchmarks/Olden/em3d/make_graph.h
  MultiSource/Benchmarks/Olden/em3d/util.c
  MultiSource/Benchmarks/Olden/em3d/util.h
  MultiSource/Benchmarks/Olden/power/compute.c
  MultiSource/Benchmarks/Olden/power/power.h
  MultiSource/Benchmarks/Olden/voronoi/defines.h
  MultiSource/Benchmarks/Olden/voronoi/newvor.c
  MultiSource/Benchmarks/Olden/voronoi/output.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42576.131579.patch
Type: text/x-patch
Size: 22210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180126/9918e977/attachment.bin>


More information about the llvm-commits mailing list