SlideShare une entreprise Scribd logo
1  sur  7
POWERPC ASSEMBLY LANGUAGE
VINOD BUSSA
REGISTER USAGE CONVENTION
General Purpose Registers
•GPR0. Volatile register used in function prologs
•GPR1 Stack Pointer
•GPR2 TOC Pointer
•GPR3-13 Volatile Registers.
•GPR14-31 This registers must be preserved across function call
Floating Point Registers
•f0 Volatile scratch register
•f1-f4 Volatile floating-point parameter and return value registers
•f5-f13 Volatile floating-point parameter registers
•f14-f31 Non-volatile registers
REGISTER USAGE CONVENTION (CONTD..)
Special Purpose Registers
•LR. Link Register Volatile
•CTR Loop counter Register Volatile
•XER. Fixed point exception register Volatile
•FPSCR. Floating point status and control register Volatile
Condition Registers
•CR0-CR1 Volatile condition code register fields
•CR2-CR4 Non-volatile condition code register fields
•CR5-CR7 Volatile condition code register fields
SAMPLE ASSEMBLY PROGRAM 1
loop: lbz r4, 0(r3)
cmpwi r4, 0
beq done
addi r4, r4, 0x20
stb r4, 0(r3)
addi r3, r3, 1
b loop
done: b done
SAMPLE ASSEMBLY PROGRAM 2
li r4, 100
mtctr r4
loop: lwzu r5, 4(r6)
add r7, r7, r5
bdnz loop
SAMPLE ASSEMBLY PROGRAM 2
li r4, 100
mtctr r4
subi. r5,r5,8
line_loop:
lfd f0,0(r6)
addi r6,r6,8
stfdu f0,8(r5)
bdnz line_loop
THANK YOU

Contenu connexe

Tendances

Switch driver_presentation (1)
Switch driver_presentation (1)Switch driver_presentation (1)
Switch driver_presentation (1)
Michael Nattan
 
Chp5 pic microcontroller instruction set copy
Chp5 pic microcontroller instruction set   copyChp5 pic microcontroller instruction set   copy
Chp5 pic microcontroller instruction set copy
mkazree
 

Tendances (18)

Datasheet 74 ls90
Datasheet 74 ls90Datasheet 74 ls90
Datasheet 74 ls90
 
El estandar fisico rs232 c
El estandar fisico rs232 cEl estandar fisico rs232 c
El estandar fisico rs232 c
 
Arq Protocols
Arq ProtocolsArq Protocols
Arq Protocols
 
Microcontroller primer
Microcontroller primerMicrocontroller primer
Microcontroller primer
 
Bunker Level monitoring - Thermal power Plant
Bunker Level monitoring  - Thermal power PlantBunker Level monitoring  - Thermal power Plant
Bunker Level monitoring - Thermal power Plant
 
Denoised
DenoisedDenoised
Denoised
 
8086inst logical
8086inst logical8086inst logical
8086inst logical
 
555 timer
555 timer555 timer
555 timer
 
Learn microcontroller pic16f84a
Learn microcontroller pic16f84aLearn microcontroller pic16f84a
Learn microcontroller pic16f84a
 
CSL 202, Shift Registers using Flipflops
CSL 202, Shift Registers using FlipflopsCSL 202, Shift Registers using Flipflops
CSL 202, Shift Registers using Flipflops
 
H.264 Encoder Nal Packet Formation By Sbs
H.264 Encoder Nal Packet Formation By SbsH.264 Encoder Nal Packet Formation By Sbs
H.264 Encoder Nal Packet Formation By Sbs
 
Robotics lec7
Robotics lec7Robotics lec7
Robotics lec7
 
93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)
 
Lab equip list
Lab equip listLab equip list
Lab equip list
 
Switch driver_presentation (1)
Switch driver_presentation (1)Switch driver_presentation (1)
Switch driver_presentation (1)
 
Datasheet 7447
Datasheet 7447Datasheet 7447
Datasheet 7447
 
Signaling Compression
Signaling CompressionSignaling Compression
Signaling Compression
 
Chp5 pic microcontroller instruction set copy
Chp5 pic microcontroller instruction set   copyChp5 pic microcontroller instruction set   copy
Chp5 pic microcontroller instruction set copy
 

Similaire à OpenPOWER Webinar : Power pc assembly language convention and programming (10)

ESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparation
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
ARM7TDMI-S_CPU.ppt
ARM7TDMI-S_CPU.pptARM7TDMI-S_CPU.ppt
ARM7TDMI-S_CPU.ppt
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
set de instrucciones primera parte de atmel
set de instrucciones primera parte de atmelset de instrucciones primera parte de atmel
set de instrucciones primera parte de atmel
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
DIGITAL LOGIC DESIGN
DIGITAL LOGIC DESIGNDIGITAL LOGIC DESIGN
DIGITAL LOGIC DESIGN
 
WINSEM2022-23_BECE204L_TH_VL2022230500861_2023-02-10_Reference-Material-I.pptx
WINSEM2022-23_BECE204L_TH_VL2022230500861_2023-02-10_Reference-Material-I.pptxWINSEM2022-23_BECE204L_TH_VL2022230500861_2023-02-10_Reference-Material-I.pptx
WINSEM2022-23_BECE204L_TH_VL2022230500861_2023-02-10_Reference-Material-I.pptx
 

Plus de Ganesan Narayanasamy

180 nm Tape out experience using Open POWER ISA
180 nm Tape out experience using Open POWER ISA180 nm Tape out experience using Open POWER ISA
180 nm Tape out experience using Open POWER ISA
Ganesan Narayanasamy
 

Plus de Ganesan Narayanasamy (20)

Chip Design Curriculum development Residency program
Chip Design Curriculum development Residency programChip Design Curriculum development Residency program
Chip Design Curriculum development Residency program
 
Basics of Digital Design and Verilog
Basics of Digital Design and VerilogBasics of Digital Design and Verilog
Basics of Digital Design and Verilog
 
180 nm Tape out experience using Open POWER ISA
180 nm Tape out experience using Open POWER ISA180 nm Tape out experience using Open POWER ISA
180 nm Tape out experience using Open POWER ISA
 
Workload Transformation and Innovations in POWER Architecture
Workload Transformation and Innovations in POWER Architecture Workload Transformation and Innovations in POWER Architecture
Workload Transformation and Innovations in POWER Architecture
 
OpenPOWER Workshop at IIT Roorkee
OpenPOWER Workshop at IIT RoorkeeOpenPOWER Workshop at IIT Roorkee
OpenPOWER Workshop at IIT Roorkee
 
Deep Learning Use Cases using OpenPOWER systems
Deep Learning Use Cases using OpenPOWER systemsDeep Learning Use Cases using OpenPOWER systems
Deep Learning Use Cases using OpenPOWER systems
 
IBM BOA for POWER
IBM BOA for POWER IBM BOA for POWER
IBM BOA for POWER
 
OpenPOWER System Marconi100
OpenPOWER System Marconi100OpenPOWER System Marconi100
OpenPOWER System Marconi100
 
OpenPOWER Latest Updates
OpenPOWER Latest UpdatesOpenPOWER Latest Updates
OpenPOWER Latest Updates
 
POWER10 innovations for HPC
POWER10 innovations for HPCPOWER10 innovations for HPC
POWER10 innovations for HPC
 
Deeplearningusingcloudpakfordata
DeeplearningusingcloudpakfordataDeeplearningusingcloudpakfordata
Deeplearningusingcloudpakfordata
 
OpenCAPI-based Image Analysis Pipeline for 18 GB/s kilohertz-framerate X-ray ...
OpenCAPI-based Image Analysis Pipeline for 18 GB/s kilohertz-framerate X-ray ...OpenCAPI-based Image Analysis Pipeline for 18 GB/s kilohertz-framerate X-ray ...
OpenCAPI-based Image Analysis Pipeline for 18 GB/s kilohertz-framerate X-ray ...
 
AI in healthcare and Automobile Industry using OpenPOWER/IBM POWER9 systems
AI in healthcare and Automobile Industry using OpenPOWER/IBM POWER9 systemsAI in healthcare and Automobile Industry using OpenPOWER/IBM POWER9 systems
AI in healthcare and Automobile Industry using OpenPOWER/IBM POWER9 systems
 
AI in healthcare - Use Cases
AI in healthcare - Use Cases AI in healthcare - Use Cases
AI in healthcare - Use Cases
 
AI in Health Care using IBM Systems/OpenPOWER systems
AI in Health Care using IBM Systems/OpenPOWER systemsAI in Health Care using IBM Systems/OpenPOWER systems
AI in Health Care using IBM Systems/OpenPOWER systems
 
AI in Healh Care using IBM POWER systems
AI in Healh Care using IBM POWER systems AI in Healh Care using IBM POWER systems
AI in Healh Care using IBM POWER systems
 
Poster from NUS
Poster from NUSPoster from NUS
Poster from NUS
 
SAP HANA on POWER9 systems
SAP HANA on POWER9 systemsSAP HANA on POWER9 systems
SAP HANA on POWER9 systems
 
Graphical Structure Learning accelerated with POWER9
Graphical Structure Learning accelerated with POWER9Graphical Structure Learning accelerated with POWER9
Graphical Structure Learning accelerated with POWER9
 
AI in the enterprise
AI in the enterprise AI in the enterprise
AI in the enterprise
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

OpenPOWER Webinar : Power pc assembly language convention and programming

  • 2. REGISTER USAGE CONVENTION General Purpose Registers •GPR0. Volatile register used in function prologs •GPR1 Stack Pointer •GPR2 TOC Pointer •GPR3-13 Volatile Registers. •GPR14-31 This registers must be preserved across function call Floating Point Registers •f0 Volatile scratch register •f1-f4 Volatile floating-point parameter and return value registers •f5-f13 Volatile floating-point parameter registers •f14-f31 Non-volatile registers
  • 3. REGISTER USAGE CONVENTION (CONTD..) Special Purpose Registers •LR. Link Register Volatile •CTR Loop counter Register Volatile •XER. Fixed point exception register Volatile •FPSCR. Floating point status and control register Volatile Condition Registers •CR0-CR1 Volatile condition code register fields •CR2-CR4 Non-volatile condition code register fields •CR5-CR7 Volatile condition code register fields
  • 4. SAMPLE ASSEMBLY PROGRAM 1 loop: lbz r4, 0(r3) cmpwi r4, 0 beq done addi r4, r4, 0x20 stb r4, 0(r3) addi r3, r3, 1 b loop done: b done
  • 5. SAMPLE ASSEMBLY PROGRAM 2 li r4, 100 mtctr r4 loop: lwzu r5, 4(r6) add r7, r7, r5 bdnz loop
  • 6. SAMPLE ASSEMBLY PROGRAM 2 li r4, 100 mtctr r4 subi. r5,r5,8 line_loop: lfd f0,0(r6) addi r6,r6,8 stfdu f0,8(r5) bdnz line_loop