summaryrefslogtreecommitdiff
path: root/compiler/utils/assembler_test_base.h
AgeCommit message (Collapse)Author
2025-03-20Move more path logic for tests to testing.cc, so it can be used without Martin Stjernholm
depending on CommonArtTest. Preparation to fix the libart-gtest dependency in art_standalone_libartpalette_tests. Due to a new #include, this necessitated fixing a bunch of `testing` namespace references that could become ambigious wrt `art::testing`. Test: m generate-boot-image Test: art/tools/buildbot-build.sh Bug: 404306250 Change-Id: Iafb3d73148125775c9c5ddbcbaef39dc61859118
2024-08-23riscv64: Support Zbs ISA extension in ART assembler s.kozub
ISA extension support implemented in assembler Test: m test-art-host-gtest Test: run-gtests.sh Change-Id: Ib21e6768c18b90419068e1389d6a8c61f5033f92
2024-03-19Make assembler tests more strict. Vladimir Marko
If the assembled code differs, fail even if the disassembly and code size are the same, except for x86 and x86-64. Test: m test-art-host-gtest Bug: 328561342 Change-Id: I80c10088edd7f0a83dfa30e1d388b831e77c8d6e
2024-02-24riscv64: Make "C" extension default for assembler tests. Vladimir Marko
Move responsibility for restricting the instruction set to individual tests. Test: m test-art-host-gtest Bug: 283082089 Change-Id: I4a4f96df2d3b8fd1feae4b56cf13053b542ee732
2024-01-30riscv64: RISC-V RVV assembler tests Roman Artemev
Add tests for newly added instructions Adjust clang/objdump CLI options Test: m art_compiler_host_tests Test: $NATIVE_TESTS/art_compiler_host_tests_intermediates/art_compiler_host_tests Change-Id: I3fdd831737daf844c7b03ef010d27d44056ec59d
2023-08-21riscv64: Add support for Zba and Zbb extensions. Vladimir Marko
Test: m test-art-host-gtest Test: Manually add calls to emit these instructions after UNIMP in JNI assembler's `DeliverPendingException()` and then `m dump-oat` and inspect the output. Bug: 283082089 Change-Id: I4807d0b214e7896544dd74349e0637a1e37fc1bf
2023-06-02Add assembler for riscv64, part 4. Lifang Xia
Implement fences, LR/SC and atomic operations. Test: m test-art-host-gtest Bug: 283082089 Signed-off-by: Lifang Xia <lifang_xia@linux.alibaba.com> Signed-off-by: Wendong Wang <wangwd@xcvmbyte.com> Signed-off-by: Cao Xia <caoxia@eswincomputing.com> Change-Id: If10463d33071db577c4cc775ad3700c1746e093d
2023-06-02Add assembler for riscv64, part 3. Lifang Xia
Implement branches, literals and jump tables. Fix some FP instructions. Test: m test-art-host-gtest Bug: 283082089 Signed-off-by: Lifang Xia <lifang_xia@linux.alibaba.com> Signed-off-by: Wendong Wang <wangwd@xcvmbyte.com> Signed-off-by: Cao Xia <caoxia@eswincomputing.com> Change-Id: Ib21d01b7cc0988e0a82a079fc039db3d5fcbfa14
2023-05-02Add assembler for riscv64, part 1. Lifang Xia
Test: m test-art-host-gtest Bug: 271573990 Signed-off-by: Lifang Xia <lifang_xia@linux.alibaba.com> Signed-off-by: Wendong Wang <wangwd@xcvmbyte.com> Signed-off-by: Cao Xia <caoxia@eswincomputing.com> Change-Id: Ie1306521b8df28173b9be40f754e114bd849985b
2023-04-05Fix "readability-redundant-string-cstr" clang-tidy issues Stefano Cianciulli
Bug: 264654008 Test: m tidy-art Change-Id: Ic852d58f106187791fa3a0d31829654de41bcb2b
2023-03-23Set --no-print-imm-hex for llvm-objdump invocations Yi Kong
llvm-objdump changed the default behaviour of print-imm-hex, breaking a number of tests relying on exact output of it. Explicitly set to --no-print-imm-hex to avoid breakages. Test: m test-art-host-gtest-art_compiler_host_tests Bug: 264965700 Change-Id: Icfe165da5818f68080a036f238e479262b919ace
2022-11-09Make compiler/utils/ symbols hidden. Vladimir Marko
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I5e39375f16e0ff1372c35fda444a4ef33bf320bf
2022-06-30Fix performance-for-range-copy clang-tidy issues Stefano Cianciulli
Test: m tidy-art Bug: 213953102 Change-Id: I206a44aa4c1f3f2f91e4f94831d042e903c71c65
2021-09-11Make sure only comments are stripped Yi Kong
The regex " +#.*" could also match immediates on ARM, e.g. cmp r1, #1234 Fix it by requiring a space after the hash mark. Test: art_compiler_host_tests Change-Id: I3cf038ff6547edad8a417961d8bb2b27c0872f51
2021-09-10Adapt ART tests for the new llvm-objdump output format Yi Kong
llvm-objdump now emit comments where it sees helpful, breaking many test expectations. Since these comments are subject to frequent format changes, trim them from the output in ART tests. Test: m test-art-host-gtest Bug: 197230471 Change-Id: I27f33e28f993f3826b3a1da75afa9a79ad9c360d
2020-09-22Fix expected results for clang-r399163 update. Stephen Hines
llvm-objdump changed the format it uses for displaying assembly, so we must also adapt all of the ART tests similarly, since they check for exact matching output. llvm-dwarfdump has similarly changed its outputs, so we adjust our expectations there too. Bug: http://b/155835175 Test: m test-art-host-gtest Change-Id: Iefdb7b98b5f87d9c7bbad1930a4393919d9b9b34
2020-07-15Revert^2 "Switch to LLVM prebuilt tools for ART gtests" David Srbecky
It is also necessary to adjust the expected output of some tests. This reverts commit ea54b823a3a02f65c865e11bbbccb327a273c039. Bug: 147817558 Test: m test-art-host-gtest Change-Id: Ib244e8b7d43d575299654397a47056f295ab4589
2020-07-10Revert "Switch to LLVM prebuilt tools for ART gtests" Alex Light
This reverts commit 8070443ce4b31a6787c22490f18f838f8f6ed4be. Reason for revert: Failing on chrome buildbots. Test: None Bug: 137817558 Change-Id: I4cbb4898e859ce33560592dd63cbf4a413048662
2020-07-10Switch to LLVM prebuilt tools for ART gtests David Srbecky
It is also necessary to adjust the expected output of some tests. Bug: 147817558 Test: m test-art-host-gtest Change-Id: Ib517169614470193e0c55f566adb72a526ae6902
2020-07-09Refactor arm assembly tests. David Srbecky
Another step in preparation to move to the LLVM toolchain. Bug: 147817558 Test: m test-art-host-gtest Change-Id: Ie5be337165d8f24e04740de0486144fa6a62f063
2020-07-09Rewrite assembler_test_base.h David Srbecky
Simplify the code in preparation of move to LLVM prebuilt tools. Bug: 147817558 Test: m test-art-host-gtest Change-Id: Iba277235255fd7d7f0965749b0b2d4a9567ced1f
2020-03-02Move entry spills determination to JNI compiler. Vladimir Marko
The calling convention no longer describes entry spills as spilling is the JNI compiler's responsibility. This allows future improvements, such as spilling registers directly to the HandleScope or outgoing stack args. Remove the notion of interprocedural scratch register from calling conventions and let assemblers deal with all scratch register uses. The remaining JNI assembler APIs that take scratch registers are currently unused and can be removed. Also fix a bug in disassembly comparison for tests; the contents of two files were considered identical if the second one just contained additional data. This change fully preserves the generated code and adds TODO comments where doing so results in weird or suboptimal code. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Prebuilt boot image is unchanged. Test: aosp_taimen-userdebug boots. Bug: 12189621 Change-Id: Ic26a670276920313cd907a6eda8d982cf0abfd81
2018-12-03Add support for ANDROID_RUNTIME_ROOT variable Neil Fuller
This commit introduces the ANDROID_RUNTIME_ROOT environment variable in preparation for its use within the runtime module. As a module, ART must no longer use the Android-wide ANDROID_ROOT environment variable as the base of default paths for module content. ANDROID_RUNTIME_ROOT will take over the responsibility. It remains a variable to unify host and device treatment. Some test methods (SetUpAndroidData, TearDownAndroidData SetUpAndroidRoot) have been renamed to clarify their purpose. Bug: 119935277 Test: build / treehugger Change-Id: I7c7de52911cbfa56cef90270425ed369176c4767
2018-03-05Move most of runtime/base to libartbase/base David Sehr
Enforce the layering that code in runtime/base should not depend on runtime by separating it into libartbase. Some of the code in runtime/base depends on the Runtime class, so it cannot be moved yet. Also, some of the tests depend on CommonRuntimeTest, which itself needs to be factored (in a subsequent CL). Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2
2017-11-08cpplint: Cleanup errors Igor Murashkin
Cleanup errors from upstream cpplint in preparation for moving art's cpplint fork to upstream tip-of-tree cpplint. Test: cd art && mm Bug: 68951293 Change-Id: I15faed4594cbcb8399850f8bdee39d42c0c5b956
2017-07-24ART: Include cleanup Andreas Gampe
Let clang-format reorder the header includes. Derived with: * .clang-format: BasedOnStyle: Google IncludeIsMainRegex: '(_test|-inl)?$' * Steps: find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup' git-clang-format -style=file HEAD^ manual inspection git commit -a --amend Test: mmma art Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
2017-02-01Separate art::Exec from utils David Sehr
The rest of utils.cc does not depend on art::Runtime. This separates the part dependent on that class, so that including utils.cc in the build does not require the entire Runtime. Another preparatory cleanup to getting tools to build on Windows. Bug: 22322814 Test: test-art Change-Id: I194ff363fc2ab87e5311ecea6973a2d0fad2621d
2016-12-13ART: Clean up utils.h Andreas Gampe
Remove functionality provided by libbase. Move some single-use functions to their respective users. Test: m test-art-host Change-Id: I75594035fa975200d638cc29bb9f31bc6e6cb29f
2016-11-04ART: Use references in assembler tests Andreas Gampe
Move parameters to const references. Bug: 32619234 Test: m Change-Id: Ib68bdc313b91fee1e9e4e1e794eeca630837b005
2015-10-07ART: Change asm test logging Andreas Gampe
Adapt the output a bit to log the exact shell command, and change how the output is logged and what is logged. Should get more info on failure. Change-Id: Iacf58d27d6e1cf01e2fcd5835c4e0f8b5a820501
2015-10-06ART: Add more error logging to assembler tests Andreas Gampe
Add error logging so we can figure out when something goes wrong on the build servers. Change-Id: Idf9bc1d0e19846059d1dc78510be6333179cd758
2015-05-26Merge "ART: Clean up arm64 kNumberOfXRegisters usage." Vladimir Marko
2015-05-26ART: Clean up arm64 kNumberOfXRegisters usage. Vladimir Marko
Avoid undefined behavior for arm64 stemming from 1u << 32 in loops with upper bound kNumberOfXRegisters. Create iterators for enumerating bits in an integer either from high to low or from low to high and use them for <arch>Context::FillCalleeSaves() on all architectures. Refactor runtime/utils.{h,cc} by moving all bit-fiddling functions to runtime/base/bit_utils.{h,cc} (together with the new bit iterators) and all time-related functions to runtime/base/time_utils.{h,cc}. Improve test coverage and fix some corner cases for the bit-fiddling functions. Bug: 13925192 Change-Id: I704884dab15b41ecf7a1c47d397ab1c3fc7ee0f7
2015-05-22Revert "Revert "Introduce a NearLabel in thumb2."" Nicolas Geoffray
This reverts commit 1f277e3cef6c33cd35e91123978491d83338d2ad. - Fix CompareAndBranch to not use cbz/cbnz with high registers. - Add a test for CompareAndBranch with the *inc file, as the other assembler test infrastructure does not handle labels. Change-Id: If552bf1112b96caa3b9bb6c73c4b40bb90a33db7
2015-04-24ART: Refactor utils/assembler test Andreas Gampe
Split out the part that compares a buffer with the product of a host assembler. That will allow to reuse this for the Quick assemblers. Change-Id: Ie15777cb0a22f7532d8a8ea35403db0f229cd26f