summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_arm.cc
AgeCommit message (Collapse)Author
2014-11-27[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}Calin Juravle
Adds: - float comparison for arm, x86, x86_64 backends. - ucomis{s,d} assembly to x86 and x86_64. - vmstat assebmly for thumb2 - new assembly tests Change-Id: Ie3e19d0c08b3b875cd0a4be4ee4e9c8a4a076290
2014-11-27Add support for long-to-double in the optimizing compiler.Roland Levillain
- Add support for the long-to-double Dex instruction in the optimizing compiler. - Enable requests of temporary FPU (double) registers during code generation. - Fix art::x86::X86Assembler::LoadLongConstant and extend it to int64_t values. - Have art::x86_64::X86_64Assembler::cvtsi2sd work with 64-bit operands. - Generate x86, x86-64 and ARM (but not ARM64) code for long to double HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: Ie73d9e5e25bd2e15f585c371e8fc2dcb83438ccd
2014-11-26Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}"Calin Juravle
Fails on arm due to missing vmrs op after vcmp. I revert this instead of pushing the fix because I don't understand yet why it compiles with run-test but not with dex2oat. This reverts commit fd861249f31ab360c12dd1ffb131d50f02b0bfc6. Change-Id: Idc2d30f6a0f39ddd3596aa18a532ae90f8aaf62f
2014-11-26[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}Calin Juravle
- adds float comparison for arm, x86, x86_64 backends. - adds ucomis{s,d} assembly to x86 and x86_64. Change-Id: I232d2b6e9ecf373beb5cc63698dd97a658ff9c83
2014-11-26Merge "Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}""Nicolas Geoffray
2014-11-26Revert "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}"Nicolas Geoffray
Fails on x86_64 and target. This reverts commit cea28ec4b9e94ec942899acf1dbf20f8999b36b4. Change-Id: I30c1d188c7ecfe765f137a307022ede84f15482c
2014-11-26Merge "[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}"Calin Juravle
2014-11-26[optimizing compiler] Add CMP{L,G}_{FLOAT,DOUBLE}Calin Juravle
- adds float comparison for arm, x86, x86_64 backends. - adds ucomis{s,d} assembly to x86 and x86_64. Change-Id: Ie91e04bfb402025073054f3803a3a569e4705caa
2014-11-25Move dexCacheStrings from ArtMethod to ClassMathieu Chartier
Adds one load for const strings which are not direct. Saves >= 60KB of memory avg per app. Image size: -350KB. Bug: 17643507 Change-Id: I2d1a3253d9de09682be9bc6b420a29513d592cc8 (cherry picked from commit f521f423b66e952f746885dd9f6cf8ef2788955d)
2014-11-24[optimizing compiler] Add shiftsCalin Juravle
Added SHL, SHR, USHR for arm, x86, x86_64. Change-Id: I971f594e270179457e6958acf1401ff7630df07e
2014-11-19Consistently use k{InstructionSet}WordSize.Nicolas Geoffray
These constants were defined prior to k{InstructionSet}PointerSize. So use them consistently in optimizing as a first step. We can discuss whether we should remove them in a second step. Change-Id: If129de1a3bb8b65f8d9c816a8ad466815fb202e6
2014-11-18Change 64 bit ArtMethod fields to be pointer sizedMathieu Chartier
Changed the 64 bit entrypoint and gc map fields in ArtMethod to be pointer sized. This saves a large amount of memory on 32 bit systems. Reduces ArtMethod size by 16 bytes on 32 bit. Total number of ArtMethod on low memory mako: 169957 Image size: 49203 methods -> 787248 image size reduction. Zygote space size: 1070 methods -> 17120 size reduction. App methods: ~120k -> 2 MB savings. Savings per app on low memory mako: 125K+ per app (less active apps -> more image methods per app). Savings depend on how often the shared methods are on dirty pages vs shared. TODO in another CL, delete gc map field from ArtMethod since we should be able to get it from the Oat method header. Bug: 17643507 Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8 (cherry picked from commit e832e64a7e82d7f72aedbd7d798fb929d458ee8f)
2014-11-18Opt compiler: Add support for more IRs on arm64.Alexandre Rames
Change-Id: I4b6425135d1af74912a206411288081d2516f8bf
2014-11-17Add support for int-to-float & int-to-double in optimizing.Roland Levillain
- Add support for the int-to-float and int-to-double Dex instructions in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for byte to float, short to float, int to float, char to float, byte to double, short to double, int to double and char to double HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: I963f9d0184a5d3721af2d8f593f133d5af7aa6a3
2014-11-17Merge "[optimizing compiler] Add REM_INT, REM_LONG"Calin Juravle
2014-11-17[optimizing compiler] Add REM_INT, REM_LONGCalin Juravle
- for arm, x86, x86_64 - minor cleanup/fix in div tests Change-Id: I240874010206a5a9b3aaffbc81a885b94c248f93
2014-11-17Merge "Add support for int-to-short in the optimizing compiler."Roland Levillain
2014-11-17Merge "Minor object store optimizations."Nicolas Geoffray
2014-11-14Add support for int-to-short in the optimizing compiler.Roland Levillain
- Add support for the int-to-short Dex instruction in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for byte to short, int to short and char to short HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: If1829549708d9c3473efaa641f7f0bcfa6080ae9
2014-11-14Minor object store optimizations.Nicolas Geoffray
- Avoid emitting write barrier when the value is null. - Do not do a typecheck on an arraystore when storing something that was loaded from the same array. Change-Id: I902492928692e4553b5af0fc99cce3c2186c442a
2014-11-14Add support for int-to-char in the optimizing compiler.Roland Levillain
- Add support for the int-to-char Dex instruction in the optimizing compiler. - Implement the ARM and Thumb-2 UBFX instructions and add tests for them. - Generate x86, x86-64 and ARM (but not ARM64) code for byte to char, short to char, int to char (and char to char!) HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: I5cd4c6d86f0f6a966c059715b98db35cc8f9de76
2014-11-13Merge "Add support for int-to-byte in the optimizing compiler."Roland Levillain
2014-11-13Add support for int-to-byte in the optimizing compiler.Roland Levillain
- Add support for the int-to-byte Dex instruction in the optimizing compiler. - Implement the ARM and Thumb-2 SBFX instructions. - Generate x86, x86-64 and ARM (but not ARM64) code for char to byte, short to byte and int to byte HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: Ic8b8911b90d4b5281fad15bcee96bc3ee85dc577
2014-11-13Merge "[optimizing compiler] Fix Move for instruction with constant output"Calin Juravle
2014-11-13[optimizing compiler] Fix Move for instruction with constant outputCalin Juravle
Change-Id: I15d89292dc62f8dd8643530f95ace2e8be034411
2014-11-13Merge "[optimizing compiler] Add DIV_LONG"Calin Juravle
2014-11-13Merge "[optimizing compiler] add HTemporary support for long and doubles"Calin Juravle
2014-11-13Merge "Do a parallel move in BoundsCheckSlowPath."Nicolas Geoffray
2014-11-12[optimizing compiler] Add DIV_LONGCalin Juravle
- for backends: arm, x86, x86_64 - added cqo, idivq, testq assembly for x64_64 - small cleanups Change-Id: I762ef37880749038ed25d6014370be9a61795200
2014-11-12[optimizing compiler] add HTemporary support for long and doublesCalin Juravle
Change-Id: I5247ecd71d0193050484b7632c804c9bfd20f924
2014-11-12Do a parallel move in BoundsCheckSlowPath.Nicolas Geoffray
The two locations of the index and length could overlap, so we need a parallel move. Also factorize the code for doing a parallel move based on two locations. Change-Id: Iee8b3459e2eed6704d45e9a564fb2cd050741ea4
2014-11-12Implement and/or/xor in optimizing.Nicolas Geoffray
Change-Id: I7cf6da1fd334a7177a5580931b8f174dd40b7cec
2014-11-12Implement monitorenter/monitorexit.Nicolas Geoffray
Pretty simple as they just invoke the runtime. Change-Id: I5fcb2c783deac27e55e28d8b3da3e68ea4b77363
2014-11-12Merge "Revert "Revert "Add support for long-to-int in the optimizing ↵Roland Levillain
compiler."""
2014-11-12Implement checkcast for optimizing.Nicolas Geoffray
- Ended up not using HTypeCheck because of how instanceof and checkcast end up having different logic for code generation. - Fix a x86_64 assembler bug triggered by now enabling more methods to be compiled. Difficult to test today without b/18117217. Change-Id: I3022e7ae03befb1d10bea9637ad21fadc430abe0
2014-11-11Revert "Revert "Add support for long-to-int in the optimizing compiler.""Roland Levillain
This reverts commit 3adfd1b4fb20ac2b0217b5d2737bfe30ad90257a. Change-Id: Iacf0c6492d49267e24f1b727dbf6379b21fd02db
2014-11-11Revert "Add support for long-to-int in the optimizing compiler."Roland Levillain
This reverts commit 647b96f29cb81832e698f863884fdba06674c9de. Change-Id: I552f23585463c676acbd547521b4d3ee5c0342eb
2014-11-11Add support for long-to-int in the optimizing compiler.Roland Levillain
- Add support for the long-to-int Dex instruction in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for long-to-int HTypeConversion nodes. - Add related tests to test/422-type-conversion. - Also fix comments in test/415-optimizing-arith-neg and in test/416-optimizing-arith-not. Change-Id: I3084af30f2a495d178362ae1154dc7ceb7bf3a58
2014-11-10Support Java conversions from char to long in opt. compiler.Roland Levillain
These char to long conversions generate int-to-long Dex instructions. Change-Id: I6a8e71b57870cf5e8d5bc638fabce0fc7593f0b2
2014-11-10Merge "Support invoke-interface in optimizing."Nicolas Geoffray
2014-11-10Support invoke-interface in optimizing.Nicolas Geoffray
Change-Id: Ic18d7c3d2810557231caf0571956e0c431f5d384
2014-11-07Implement instanceof in optimizing.Nicolas Geoffray
- Only fast-path for now: null or same class. - Use pQuickInstanceofNonTrivial for slow path. Change-Id: Ic5196b94bef792f081f3cb4d15157058e1381e6b
2014-11-07Do not update Out after it has a valid location.Nicolas Geoffray
Slow paths use LocationSummary to know where to move things around, and they are executed at the end of the code generation. This fix is needed for https://android-review.googlesource.com/#/c/113345/. Change-Id: Id336c6409479b1de6dc839b736a7234d08a7774a
2014-11-07Support floats and doubles in fields.Nicolas Geoffray
Change-Id: I19832106633405403f0461b3fe13b268abe39db3
2014-11-06Merge "Support float & double negation in the optimizing compiler."Roland Levillain
2014-11-06Implement try/catch/throw in optimizing.Nicolas Geoffray
- We currently don't run optimizations in the presence of a try/catch. - We therefore implement Quick's mapping table. - Also fix a missing null check on array-length. Change-Id: I6917dfcb868e75c1cf6eff32b7cbb60b6cfbd68f
2014-11-06Support float & double negation in the optimizing compiler.Roland Levillain
- Add support for the neg-float and neg-double Dex instructions in the optimizing compiler. - Generate x86, x86-64 and ARM (but not ARM64) code for float and double HNeg nodes. - Add related tests to test/415-optimizing-arith-neg. Change-Id: I29739a86e13dbe6f64e191641d01637c867cba6c
2014-11-06Merge "[optimizing compiler] Add div-int and exception handling."Calin Juravle
2014-11-06[optimizing compiler] Add div-int and exception handling.Calin Juravle
- for backends: arm, x86, x86_64 - fixed a register allocator bug: the request for a fixed register for the first input was ignored if the output was kSameAsFirstInput - added divide by zero exception - more tests - shuffle around some code in the builder to reduce the number of lines of code for a single function. Change-Id: Id3a515e02bfbc66cd9d16cb9746f7551bdab3d42
2014-11-06Don't use R4 for suspend check.Nicolas Geoffray
Change-Id: I57ccfaa527e2676f21339860b28955468a87adfe