资源描述:
《4. Chapter2 ISA》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、Chapter2MachineInstruction王国华ghwang@scut.edu.cnContents2.1InstructionandInstructionSequencing2.2InstructionFormats2.3AddressingModes2.4Stacks2.5Subroutines2.6AdditionalInstructions2.7CISCInstructionSets2.8RISCandCISCStyles22.1InstructionandInstructionSequencingRegis
2、terTransferNotationAssembly-LanguageNotationRISCandCISCInstructionSetsIntroductiontoRISCInstructionSetsInstructionExecutionandStraight-LineSequencingBranching32.1InstructionandInstructionSequencingFourTypesofInstructionsDatatransfersbetweenthememoryandtheprocessorregi
3、stersArithmeticandlogicoperationsondataProgramsequencingandcontrolI/Otransfers4RegisterTransferNotationRegistertransfernotationisusedtodescribehardware-leveldatatransfersandoperationsProcessorregister:R0,R5I/Oregister:DATAIN,OUTSTATUSMemorylocation:LOC,PLACE,A,VAR2Us
4、e[…]todenotecontentsofalocationUsetodenotetransfertoadestination5RegisterTransferNotationExample1:R2[LOC]TransferfromLOCinmemorytoregisterR2Right-handexpressionalwaysdenotesavalue,left-handsidealwaysnamesalocationExample2:R4[R2][R3]AddthecontentsofregistersR2andR3,p
5、lacethesuminregisterR46Assembly-LanguageNotationRTNshowsdatatransfersandarithmeticAnothernotationneededtorepresentmachineinstructions&programsusingthemAssemblylanguageisusedforthispurposeForthetwoprecedingexamplesusingRTN,theassembly-languageinstructionsare:LoadR2,LOCAdd
6、R4,R2,R37Assembly-LanguageNotationAninstructionspecifiesthedesiredoperationandtheoperandsthatareinvolvedExamplesinthischapterwilluseEnglishwordsfortheoperations(e.g.,Load,Store,andAdd)Commercialprocessorsusemnemonics,usuallyabbreviations(e.g.,LD,ST,andADD)Mnemonicsdiffer
7、fromprocessortoprocessor8RISCandCISCInstructionSetsNatureofinstructionsdistinguishescomputerTwofundamentallydifferentapproachesReducedInstructionSetComputers(RISC)haveone-wordinstructionsandrequirearithmeticoperandstobeinregistersSmallsetofinstructions(typically32)Simpl
8、einstructions,eachexecutesinoneclockcycleEffectiveuseofpipeliningExample: