collab/polyglot-riscv-arm
what if the same machine code was valid riscv and arm asm
git clone https://git.julia.blue/collab/polyglot-riscv-arm
885cc4e
main
1< ?xml version="1.0" encoding="utf-8"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" > 3< html xmlns ="http://www.w3.org/1999/xhtml ">< head >< link rel ="stylesheet "type ="text/css "href ="insn.css "/>< meta name ="generator "content ="iform.xsl "/>< title > PUSH (multiple registers) -- AArch32</ title ></ head >< body >< table style ="margin: 0 auto; ">< tr >< td >< div class ="topbar ">< a href ="index.html "> Base Instructions</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="fpsimdindex.html "> SIMD&FP Instructions</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="a32_encindex.html "> A32 Instructions by Encoding</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="t32_encindex.html "> T32 Instructions by Encoding</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="shared_pseudocode.html "> Shared Pseudocode</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="notice.html "> Proprietary Notice</ a ></ div ></ td ></ tr ></ table >< hr />< h2 class ="instruction-section "> PUSH (multiple registers)</ h2 >< p > Push multiple registers to Stack stores multiple general-purpose registers to the stack, storing to consecutive memory locations ending just below the address in SP, and updates SP to point to the start of the stored data.</ p >< p > 4 This is an alias of 5< a href ="stmdb.html "> STMDB, STMFD</ a > . 6 This means: 7</ p >< ul >< li > 8 The encodings in this description are named to match the encodings of 9< a href ="stmdb.html "> STMDB, STMFD</ a > . 10</ li >< li > The description of< a href ="stmdb.html "> STMDB, STMFD</ a > gives the operational pseudocode, any< span class ="arm-defined-word "> constrained unpredictable</ span > behavior, and any operational information for this instruction.</ li ></ ul > 11< p class ="desc "> 12 It has encodings from the following instruction sets: 13 A32 ( 14< a href ="#iclass_a1 "> A1</ a > 15 ) 16 and 17 T32 ( 18< a href ="#iclass_t1 "> T1</ a > 19 ) 20 . 21</ p > 22< h3 class ="classheading ">< a id ="iclass_a1 "/> A1</ h3 >< div class ="regdiagram-32 ">< table class ="regdiagram ">< thead >< tr >< td > 31</ td >< td > 30</ td >< td > 29</ td >< td > 28</ td >< td > 27</ td >< td > 26</ td >< td > 25</ td >< td > 24</ td >< td > 23</ td >< td > 22</ td >< td > 21</ td >< td > 20</ td >< td > 19</ td >< td > 18</ td >< td > 17</ td >< td > 16</ td >< td > 15</ td >< td > 14</ td >< td > 13</ td >< td > 12</ td >< td > 11</ td >< td > 10</ td >< td > 9</ td >< td > 8</ td >< td > 7</ td >< td > 6</ td >< td > 5</ td >< td > 4</ td >< td > 3</ td >< td > 2</ td >< td > 1</ td >< td > 0</ td ></ tr ></ thead >< tbody >< tr class ="firstrow ">< td colspan ="4 "class ="lr "> != 1111</ td >< td class ="l "> 1</ td >< td > 0</ td >< td class ="r "> 0</ td >< td class ="lr "> 1</ td >< td class ="lr "> 0</ td >< td class ="lr "> 0</ td >< td class ="lr "> 1</ td >< td class ="lr "> 0</ td >< td class ="l "> 1</ td >< td > 1</ td >< td > 0</ td >< td class ="r "> 1</ td >< td colspan ="16 "class ="lr "> register_list</ td ></ tr >< tr class ="secondrow ">< td colspan ="4 "class ="droppedname "> cond</ td >< td colspan ="3 "/>< td />< td />< td />< td class ="droppedname "> W</ td >< td />< td colspan ="4 "class ="droppedname "> Rn</ td >< td colspan ="16 "/></ tr ></ tbody ></ table ></ div >< div class ="encoding ">< h4 class ="encoding "> A1</ h4 >< a id ="PUSH_STMDB_A1 "/>< p class ="asm-code "> PUSH{< a href ="#sa_c "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <c></ a > }{< a href ="#sa_q "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <q></ a > }< a href ="#sa_registers_3 "title ="List of two or more registers to be stored "> <registers></ a ></ p >< p class ="equivto "> 23 is equivalent to 24</ p > 25< p class ="asm-code ">< a href ="stmdb.html#STMDB_A1 "> STMDB</ a > {< a href ="#sa_c "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <c></ a > }{< a href ="#sa_q "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <q></ a > } SP!,< a href ="#sa_registers_3 "title ="List of two or more registers to be stored "> <registers></ a ></ p > 26< p class ="equivto "> 27 and is the preferred disassembly when 28< span class ="pseudocode "> BitCount(register_list) > 1</ span > . 29</ p > 30</ div > 31< h3 class ="classheading ">< a id ="iclass_t1 "/> T1</ h3 >< div class ="regdiagram-16x2 ">< table class ="regdiagram ">< thead >< tr >< td > 15</ td >< td > 14</ td >< td > 13</ td >< td > 12</ td >< td > 11</ td >< td > 10</ td >< td > 9</ td >< td > 8</ td >< td > 7</ td >< td > 6</ td >< td > 5</ td >< td > 4</ td >< td > 3</ td >< td > 2</ td >< td > 1</ td >< td > 0</ td >< td > 15</ td >< td > 14</ td >< td > 13</ td >< td > 12</ td >< td > 11</ td >< td > 10</ td >< td > 9</ td >< td > 8</ td >< td > 7</ td >< td > 6</ td >< td > 5</ td >< td > 4</ td >< td > 3</ td >< td > 2</ td >< td > 1</ td >< td > 0</ td ></ tr ></ thead >< tbody >< tr class ="firstrow ">< td class ="l "> 1</ td >< td > 1</ td >< td > 1</ td >< td > 0</ td >< td > 1</ td >< td > 0</ td >< td class ="r "> 0</ td >< td class ="l "> 1</ td >< td class ="r "> 0</ td >< td class ="lr "> 0</ td >< td class ="lr "> 1</ td >< td class ="lr "> 0</ td >< td class ="l "> 1</ td >< td > 1</ td >< td > 0</ td >< td class ="r "> 1</ td >< td class ="lr "> (0)</ td >< td class ="lr "> M</ td >< td colspan ="14 "class ="lr "> register_list</ td ></ tr >< tr class ="secondrow ">< td colspan ="7 "/>< td colspan ="2 "/>< td />< td class ="droppedname "> W</ td >< td />< td colspan ="4 "class ="droppedname "> Rn</ td >< td class ="droppedname "> P</ td >< td />< td colspan ="14 "/></ tr ></ tbody ></ table ></ div >< div class ="encoding ">< h4 class ="encoding "> T1</ h4 >< a id ="PUSH_STMDB_T1 "/>< p class ="asm-code "> PUSH{< a href ="#sa_c "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <c></ a > }.W< a href ="#sa_registers_2 "title ="List of one or more registers to be stored (field "register_list") "> <registers></ a > 32 // 33 34 (All registers in R0-R7, LR) 35</ p >< p class ="asm-code "> PUSH{< a href ="#sa_c "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <c></ a > }{< a href ="#sa_q "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <q></ a > }< a href ="#sa_registers_2 "title ="List of one or more registers to be stored (field "register_list") "> <registers></ a ></ p >< p class ="equivto "> 36 is equivalent to 37</ p > 38< p class ="asm-code ">< a href ="stmdb.html#STMDB_T1 "> STMDB</ a > {< a href ="#sa_c "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <c></ a > }{< a href ="#sa_q "title ="See {xref{ARMARM_Babbefhf}{Standard assembler syntax fields}} "> <q></ a > } SP!,< a href ="#sa_registers_2 "title ="List of one or more registers to be stored (field "register_list") "> <registers></ a ></ p > 39< p class ="equivto "> 40 and is the preferred disassembly when 41< span class ="pseudocode "> BitCount(M:register_list) > 1</ span > . 42</ p > 43</ div > 44< div class ="encoding-notes "/>< h3 class ="explanations "> Assembler Symbols</ h3 >< div class ="explanations ">< table >< col class ="asyn-l "/>< col class ="asyn-r "/>< tr >< td > <c></ td >< td >< a id ="sa_c "/> 45 46< p class ="aml "> See< a class ="armarm-xref "title ="Reference to Armv8 ARM section "data-linkend ="Babbefhf "> Standard assembler syntax fields</ a > .</ p > 47 48</ td ></ tr ></ table >< table >< col class ="asyn-l "/>< col class ="asyn-r "/>< tr >< td > <q></ td >< td >< a id ="sa_q "/> 49 50< p class ="aml "> See< a class ="armarm-xref "title ="Reference to Armv8 ARM section "data-linkend ="Babbefhf "> Standard assembler syntax fields</ a > .</ p > 51 52</ td ></ tr ></ table >< table >< col class ="asyn-l "/>< col class ="asyn-r "/>< tr >< td > <registers></ td >< td >< a id ="sa_registers_3 "/> 53 54 55 56 57< p class ="aml "> For encoding A1: is a list of two or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also< a class ="armarm-xref "title ="Reference to Armv8 ARM section "data-linkend ="CHDDBEDG "> Encoding of lists of general-purpose registers and the PC</ a > .</ p > 58< p class ="aml "> The SP and PC can be in the list. However:</ p > 59< ul > 60< li > Arm deprecates the use of instructions that include the PC in the list.</ li > 61< li > If the SP is in the list, and it is not the lowest-numbered register in the list, the instruction stores an< span class ="arm-defined-word "> unknown</ span > value for the SP.</ li > 62</ ul > 63 64</ td ></ tr >< tr >< td />< td >< a id ="sa_registers_2 "/> 65 66 67 68 69< p class ="aml "> For encoding T1: is a list of one or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also< a class ="armarm-xref "title ="Reference to Armv8 ARM section "data-linkend ="CHDDBEDG "> Encoding of lists of general-purpose registers and the PC</ a > .</ p > 70< p class ="aml "> The registers in the list must be in the range R0-R12, encoded in the "register_list" field, and can optionally contain the LR. If the LR is in the list, the "M" field is set to 1, otherwise it defaults to 0.</ p > 71 72</ td ></ tr ></ table ></ div >< div class ="syntax-notes "/>< div class ="alias_ps_section ">< h3 class ="pseudocode "> Operation</ h3 >< p > The description of< a href ="stmdb.html "> STMDB, STMFD</ a > gives the operational pseudocode for this instruction.</ p ></ div >< hr />< table style ="margin: 0 auto; ">< tr >< td >< div class ="topbar ">< a href ="index.html "> Base Instructions</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="fpsimdindex.html "> SIMD&FP Instructions</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="a32_encindex.html "> A32 Instructions by Encoding</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="t32_encindex.html "> T32 Instructions by Encoding</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="shared_pseudocode.html "> Shared Pseudocode</ a ></ div ></ td >< td >< div class ="topbar ">< a href ="notice.html "> Proprietary Notice</ a ></ div ></ td ></ tr ></ table >< p class ="versions "> 73 Internal version only: isa v01_31, pseudocode v2024-09_rel 74 ; Build timestamp: 2024-09-26T13:26 75</ p >< p class ="copyconf "> 76 Copyright © 2010-2024 Arm Limited or its affiliates. All rights reserved. 77 This document is Non-Confidential. 78</ p ></ body ></ html >