summaryrefslogtreecommitdiffstats
path: root/test/800-smali/smali
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2014-11-25 10:52:19 -0800
committerbuzbee <buzbee@google.com>2014-11-25 11:31:09 -0800
commit6489d22a44ea7d135c142ee94925570d0333d5e7 (patch)
tree078cd0518627673566727494b003fa671c027dc8 /test/800-smali/smali
parent79d43fd465a302252062b1d6dbd32c8a7d79f266 (diff)
downloadart-6489d22a44ea7d135c142ee94925570d0333d5e7.zip
art-6489d22a44ea7d135c142ee94925570d0333d5e7.tar.gz
art-6489d22a44ea7d135c142ee94925570d0333d5e7.tar.bz2
Quick compiler: handle embedded switch data
Although switch data is generally placed at the end of a dex file by dx, it can occur elsewhere (and does via obsfucators). This CL fixes a parsing error related to embedded switch data by ensuring valid dex instructions following the embedded data appear in their own basic blocks. AOSP b/80600 Change-Id: I91ead6b398386bcf168b1088c5bc13a53b18f26e
Diffstat (limited to 'test/800-smali/smali')
-rw-r--r--test/800-smali/smali/PackedSwitch.smali26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/800-smali/smali/PackedSwitch.smali b/test/800-smali/smali/PackedSwitch.smali
new file mode 100644
index 0000000..6a3e5f0
--- /dev/null
+++ b/test/800-smali/smali/PackedSwitch.smali
@@ -0,0 +1,26 @@
+.class public LPackedSwitch;
+
+.super Ljava/lang/Object;
+
+.method public static packedSwitch(I)I
+ .registers 2
+
+ const/4 v0, 0
+ packed-switch v0, :switch_data
+ goto :default
+
+ :switch_data
+ .packed-switch 0x0
+ :case
+ .end packed-switch
+
+ :return
+ return v1
+
+ :default
+ goto :return
+
+ :case
+ goto :return
+
+.end method