Page MenuHomePhabricator

[AVR] Fix incorrect calling convention for varargs functions
ClosedPublic

Authored by benshi001 on Mar 15 2022, 8:11 PM.

Details

Summary

An i8 argument should only cost 1 byte on the stack. This is
compatible with avr-gcc.

There are also more test cases (of calling convention) are added.

Diff Detail

Unit TestsFailed

TimeTest
60,030 msx64 debian > MLIR.Examples/standalone::test.toy
Script: -- : 'RUN: at line 1'; /usr/bin/cmake /var/lib/buildkite-agent/builds/llvm-project/mlir/examples/standalone -G "Ninja" -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=/var/lib/buildkite-agent/builds/llvm-project/build/lib/cmake/mlir ; /usr/bin/cmake --build . --target check-standalone | tee /var/lib/buildkite-agent/builds/llvm-project/build/tools/mlir/test/Examples/standalone/Output/test.toy.tmp | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/mlir/test/Examples/standalone/test.toy
4,700 msx64 debian > libFuzzer.libFuzzer::fuzzer-leak.test
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/LeakTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/fuzzer-leak.test.tmp-LeakTest
60,020 msx64 debian > libFuzzer.libFuzzer::large.test
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/LargeTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/large.test.tmp-LargeTest

Event Timeline

benshi001 created this revision.Mar 15 2022, 8:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2022, 8:11 PM
Herald added subscribers: Jim, hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Mar 15 2022, 8:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2022, 8:11 PM

The failure information is caused by the build machines, not my patch.

aykevl accepted this revision.Mar 22 2022, 5:40 PM

I assume you've verified the new test cases with avr-gcc? If so, this looks good to me.

This revision is now accepted and ready to land.Mar 22 2022, 5:40 PM

I assume you've verified the new test cases with avr-gcc? If so, this looks good to me.

Yes. Verified with avr-gcc 7.3.0.

This revision was landed with ongoing or failed builds.Mar 22 2022, 7:00 PM
This revision was automatically updated to reflect the committed changes.