SlideShare a Scribd company logo
1 of 18
Architectural Support for
High-Level Languages
Submitted by:
Sudhanshu Janwadkar (M314310)
Abstraction in software design
 Assemble-level abstraction
• A programmer who writes directly with the raw machine
instruction set
• Expressing the program in terms of instructions, addresses,
registers, bytes and words
 High-level languages
• Allows the programmer to think in terms of abstractions
that are above the machine level
• The programmer may not even know on which machine the
program will ultimately run The RISC philosophy focusing
instruction set design on flexible primitive operations from
which the complier can build its high level operations
Data types
 ARM support for characters
• For handling characters is the unsigned byte load and store
instruction
 ANSI (American National Standards Institute) C basic data types
• Defines the following basic data types
– Signed and unsigned characters of at least eight bits
– Signed and unsigned short integers of at least 16 bits
– Signed and unsigned integers of at least 16 bits
– Signed and unsigned long integers of at least 32 bits
– Floating-point, double and long double floating-point numbers
– Enumerated types
– Bitfields (sets of Boolean variables)
• The ARM C complier adopts the minimum sizes for each of these
types
• The standard integer uses 32-bit values
Data types(Contd)
 ANCI C derived data types
• Defines derived data types
– Arrays, Functions, Structures, Pointers, Unions
• ARM pointers are 32 bits long and resemble unsigned integers
• The ARM C compiler aligns characters on byte boundaries, short
integers at even addresses and all other types on word boundaries
 ARM architectural support for C data types
• Provides native support for signed and unsigned 32-bit integers and
for unsigned bytes, covering the C integer, long integer and
unsigned character types
• For arrays and structures: base plus scaled index addressing
• Current versions of the ARM include signed byte and signed and
unsigned 16-bit loads and stores, providing some native support for
short integer and signed character types
Expressions
 Register use
• The key to the efficient evaluation of a complex expression is to get
the required values into the registers in the right order and to
ensure that frequently used values are normally resident in
registers
• Optimizing this trade-off between the number of values that can be
held in registers and the number of registers remaining is a major
task for the complier
 ARM support
• The 3-address instruction format used by the ARM gives the
compiler the maximum flexibility
• Thumb instructions (generally 2-address)
– restricts the compiler’s freedom to some extent
– smaller number of general registers also makes its job harder
Expressions(contd)
 Accessing operands
• A procedure will normally work with operands that are presented in one of the
following ways, and can be accessed as indicated as an argument passed through a
register
– The value is already in a register, so no further work is necessary as a argument
passed on the stack
– Stack pointer (r13) relative addressing with an immediate offset known at
compile-time allows the operand to be collected with a single LDR
• As a constant in the procedure’s literal pool
– PC-relative addressing, again with an immediate offset known at compile-time,
gives access with a single LDR
• As a local variable
– Local variables are allocated space on the stack and are accessed by
• a stack pointer relative LDR
• As a global variable
– Global (and static) variables are allocated space in the static area and are
accessed by static base (is usually in r9) relative addressing
Expressions(contd)
 Pointer arithmetic
• Arithmetic on pointers depends on the size of the data types that
the pointers are pointing to
• If a variable is used as an offset it must be scaled at run-time
• if p is held in r0 and i in r1, the change to p may be compiled as:
ADD r0, r0, r1, LSL #2 ; scale r1 to int
 Arrays
• The declaration: int a[10];
– a reference to a[i] is equivalent to the pointer-plus-offset form
*(a+i)
Conditional statements
 if…else
• The ARM architecture offers unusually efficient support for conditional expressions
when the conditionally executed statement is small
• More complex ‘if’ statements: more conventional solution
Conditional statements(contd)
switches
• ARM is to use a jump table
Conditional statements(contd)
Loops
For loops
for (i=0; i<10; i++) {a[i] = 0; }
• It can be further improved by moving the test to the bottom of the loop
Loops(contd)
While loops
• The standard conceptual arrangement of a ‘while’ loop is as follow
• One fewer branch is executed each time the complete ‘while’ structure is
encountered
Functions and procedures
 Program design
• Large programs are broken down into components that are small
enough be thoroughly tested
• How small software component performs its operation should be of
no significance to the rest of the program (abstraction)
 Program hierarchy
• The full program should be designed as a hierarchy of components
• Lower-level routines may be shared by higher-level routines, calls
may skip levels, and the depth may vary across the hierarchy
 Leaf routines
• At the lowest level of the hierarchy
• Do not call any lower-level routines
• Bottom-level routines will be library or system functions
Functions and procedures(contd)
 Subroutine
– A generic term for a routine that is called by a higher-level routine,
particularly when viewing a program at the assembly language level
 Function
– A subroutine which returns a value through its name
c = max (a, b);
 Procedure
– A subroutine which is called to carry out some operation on specified
data item(s)
printf (“Hello Worldn”);
 Argument: an expression passed to a function call
 Parameter: a value received by the function
• C uses a strict “call by value” semantics.
Functions and procedures(contd)
 ARM Procedure Call Standard
• The ARM Procedure Call Standard (APCS) is employed by the ARM C
compiler
• It defines particular uses for the ‘general-purpose’ registers
• It defines which form of stack is used from the full/empty,
ascending/descending choices
• It defines the format of a stack-based data structure used for back-
tracing when debugging programs
• It defines the function argument and result passing mechanism to
be used by all externally visible functions and procedures
• It supports the ARM shared library mechanism
– which means it supports a standard way for shared (re-entrant)
code to access static data
Functions and procedures(contd)
 APCS variants
• There are several (16) different variants of the APCS which are used to generate code for a range of
different systems, they support:
• 32- or 26- bit PCs
– Older ARM processors operated in a 26-bit address space
– Some later versions continue to support this for backwards compatibility
• Implicit or explicit stack-limit checking
– The compiler can insert instructions to perform explicit checks for stack overflow
– Where memory management hardware is available, an ARM system can allocate memory to
the stack in units of a page (no need to insert instructions)
• Two way to pass floating-point arguments
– Make extensive use – use eight floating-point registers
– Make little or no use – use the integer registers and/or on the stack
• Re-entrant or non-re-entrant code
– Code as re-entrant is position-independent and addresses all data indirectly through the static
base register (sb)
– This code can be placed in a ROM and can be shared by several processes
Thank You

More Related Content

What's hot

What's hot (20)

Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb Instruction
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_arm
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
Introduction to ARM
Introduction to ARMIntroduction to ARM
Introduction to ARM
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Risc processors
Risc processorsRisc processors
Risc processors
 
ARM 7 Detailed instruction set
ARM 7 Detailed instruction setARM 7 Detailed instruction set
ARM 7 Detailed instruction set
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Embedded c
Embedded cEmbedded c
Embedded c
 
Soc - Intro, Design Aspects, HLS, TLM
Soc - Intro, Design Aspects, HLS, TLMSoc - Intro, Design Aspects, HLS, TLM
Soc - Intro, Design Aspects, HLS, TLM
 
Arm Processors Architectures
Arm Processors ArchitecturesArm Processors Architectures
Arm Processors Architectures
 
Unit vi (1)
Unit vi (1)Unit vi (1)
Unit vi (1)
 

Viewers also liked

Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Sudhanshu Janwadkar
 
ARM - Advance RISC Machine
ARM - Advance RISC MachineARM - Advance RISC Machine
ARM - Advance RISC MachineEdutechLearners
 
2 aircraft flight instruments
2 aircraft flight instruments2 aircraft flight instruments
2 aircraft flight instrumentsSolo Hermelin
 
Aircraft instruments
Aircraft instrumentsAircraft instruments
Aircraft instrumentsKamaraja AS
 
Aircraft instrumentsystems
Aircraft instrumentsystemsAircraft instrumentsystems
Aircraft instrumentsystemsMahnil
 

Viewers also liked (8)

Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &
 
ARM - Advance RISC Machine
ARM - Advance RISC MachineARM - Advance RISC Machine
ARM - Advance RISC Machine
 
Ppt
PptPpt
Ppt
 
2 aircraft flight instruments
2 aircraft flight instruments2 aircraft flight instruments
2 aircraft flight instruments
 
Gyroscopes
Gyroscopes Gyroscopes
Gyroscopes
 
Aircraft instruments
Aircraft instrumentsAircraft instruments
Aircraft instruments
 
Aircraft instrumentsystems
Aircraft instrumentsystemsAircraft instrumentsystems
Aircraft instrumentsystems
 
Gyroscope
GyroscopeGyroscope
Gyroscope
 

Similar to Architectural support for High Level Language

Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform designRAMPRAKASHT1
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristicsAnwal Mirza
 
Introduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XEIntroduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XETemesgen Molla
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionAhmed Raza
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basicsDeepak John
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1Hatem Abd El-Salam
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point PresentationPrashantYadav931011
 
EC8791 ARM Processor and Peripherals.pptx
EC8791 ARM Processor and Peripherals.pptxEC8791 ARM Processor and Peripherals.pptx
EC8791 ARM Processor and Peripherals.pptxdeviifet2015
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronicaaravjamela
 

Similar to Architectural support for High Level Language (20)

Mod 3.pptx
Mod 3.pptxMod 3.pptx
Mod 3.pptx
 
Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform design
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristics
 
Introduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XEIntroduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XE
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
13 risc
13 risc13 risc
13 risc
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
 
CD U1-5.pptx
CD U1-5.pptxCD U1-5.pptx
CD U1-5.pptx
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
 
SS-CISC -1.pptx
SS-CISC -1.pptxSS-CISC -1.pptx
SS-CISC -1.pptx
 
EC8791 ARM Processor and Peripherals.pptx
EC8791 ARM Processor and Peripherals.pptxEC8791 ARM Processor and Peripherals.pptx
EC8791 ARM Processor and Peripherals.pptx
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronic
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
RISC.ppt
RISC.pptRISC.ppt
RISC.ppt
 
13 risc
13 risc13 risc
13 risc
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
Assembler
AssemblerAssembler
Assembler
 
OpenPOWER Webinar
OpenPOWER Webinar OpenPOWER Webinar
OpenPOWER Webinar
 
SS-assemblers 1.pptx
SS-assemblers 1.pptxSS-assemblers 1.pptx
SS-assemblers 1.pptx
 

More from Sudhanshu Janwadkar

Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)Sudhanshu Janwadkar
 
Fpga architectures and applications
Fpga architectures and applicationsFpga architectures and applications
Fpga architectures and applicationsSudhanshu Janwadkar
 
Introduction to 8051 Timer/Counter
Introduction to 8051 Timer/CounterIntroduction to 8051 Timer/Counter
Introduction to 8051 Timer/CounterSudhanshu Janwadkar
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerSudhanshu Janwadkar
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded SystemsSudhanshu Janwadkar
 
Interconnects in Reconfigurable Architectures
Interconnects in Reconfigurable ArchitecturesInterconnects in Reconfigurable Architectures
Interconnects in Reconfigurable ArchitecturesSudhanshu Janwadkar
 
Design and Implementation of a GPS based Personal Tracking System
Design and Implementation of a GPS based Personal Tracking SystemDesign and Implementation of a GPS based Personal Tracking System
Design and Implementation of a GPS based Personal Tracking SystemSudhanshu Janwadkar
 
Embedded Logic Flip-Flops: A Conceptual Review
Embedded Logic Flip-Flops: A Conceptual ReviewEmbedded Logic Flip-Flops: A Conceptual Review
Embedded Logic Flip-Flops: A Conceptual ReviewSudhanshu Janwadkar
 

More from Sudhanshu Janwadkar (20)

DSP Processors versus ASICs
DSP Processors versus ASICsDSP Processors versus ASICs
DSP Processors versus ASICs
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)
 
Fpga architectures and applications
Fpga architectures and applicationsFpga architectures and applications
Fpga architectures and applications
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Introduction to 8051 Timer/Counter
Introduction to 8051 Timer/CounterIntroduction to 8051 Timer/Counter
Introduction to 8051 Timer/Counter
 
Intel 8051 Programming in C
Intel 8051 Programming in CIntel 8051 Programming in C
Intel 8051 Programming in C
 
Hardware View of Intel 8051
Hardware View of Intel 8051Hardware View of Intel 8051
Hardware View of Intel 8051
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
CMOS Logic
CMOS LogicCMOS Logic
CMOS Logic
 
Interconnects in Reconfigurable Architectures
Interconnects in Reconfigurable ArchitecturesInterconnects in Reconfigurable Architectures
Interconnects in Reconfigurable Architectures
 
Introduction to FPGAs
Introduction to FPGAsIntroduction to FPGAs
Introduction to FPGAs
 
Design and Implementation of a GPS based Personal Tracking System
Design and Implementation of a GPS based Personal Tracking SystemDesign and Implementation of a GPS based Personal Tracking System
Design and Implementation of a GPS based Personal Tracking System
 
Embedded Logic Flip-Flops: A Conceptual Review
Embedded Logic Flip-Flops: A Conceptual ReviewEmbedded Logic Flip-Flops: A Conceptual Review
Embedded Logic Flip-Flops: A Conceptual Review
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 

Recently uploaded

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Recently uploaded (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

Architectural support for High Level Language

  • 1. Architectural Support for High-Level Languages Submitted by: Sudhanshu Janwadkar (M314310)
  • 2. Abstraction in software design  Assemble-level abstraction • A programmer who writes directly with the raw machine instruction set • Expressing the program in terms of instructions, addresses, registers, bytes and words  High-level languages • Allows the programmer to think in terms of abstractions that are above the machine level • The programmer may not even know on which machine the program will ultimately run The RISC philosophy focusing instruction set design on flexible primitive operations from which the complier can build its high level operations
  • 3. Data types  ARM support for characters • For handling characters is the unsigned byte load and store instruction  ANSI (American National Standards Institute) C basic data types • Defines the following basic data types – Signed and unsigned characters of at least eight bits – Signed and unsigned short integers of at least 16 bits – Signed and unsigned integers of at least 16 bits – Signed and unsigned long integers of at least 32 bits – Floating-point, double and long double floating-point numbers – Enumerated types – Bitfields (sets of Boolean variables) • The ARM C complier adopts the minimum sizes for each of these types • The standard integer uses 32-bit values
  • 4. Data types(Contd)  ANCI C derived data types • Defines derived data types – Arrays, Functions, Structures, Pointers, Unions • ARM pointers are 32 bits long and resemble unsigned integers • The ARM C compiler aligns characters on byte boundaries, short integers at even addresses and all other types on word boundaries  ARM architectural support for C data types • Provides native support for signed and unsigned 32-bit integers and for unsigned bytes, covering the C integer, long integer and unsigned character types • For arrays and structures: base plus scaled index addressing • Current versions of the ARM include signed byte and signed and unsigned 16-bit loads and stores, providing some native support for short integer and signed character types
  • 5. Expressions  Register use • The key to the efficient evaluation of a complex expression is to get the required values into the registers in the right order and to ensure that frequently used values are normally resident in registers • Optimizing this trade-off between the number of values that can be held in registers and the number of registers remaining is a major task for the complier  ARM support • The 3-address instruction format used by the ARM gives the compiler the maximum flexibility • Thumb instructions (generally 2-address) – restricts the compiler’s freedom to some extent – smaller number of general registers also makes its job harder
  • 6. Expressions(contd)  Accessing operands • A procedure will normally work with operands that are presented in one of the following ways, and can be accessed as indicated as an argument passed through a register – The value is already in a register, so no further work is necessary as a argument passed on the stack – Stack pointer (r13) relative addressing with an immediate offset known at compile-time allows the operand to be collected with a single LDR • As a constant in the procedure’s literal pool – PC-relative addressing, again with an immediate offset known at compile-time, gives access with a single LDR • As a local variable – Local variables are allocated space on the stack and are accessed by • a stack pointer relative LDR • As a global variable – Global (and static) variables are allocated space in the static area and are accessed by static base (is usually in r9) relative addressing
  • 7. Expressions(contd)  Pointer arithmetic • Arithmetic on pointers depends on the size of the data types that the pointers are pointing to • If a variable is used as an offset it must be scaled at run-time • if p is held in r0 and i in r1, the change to p may be compiled as: ADD r0, r0, r1, LSL #2 ; scale r1 to int  Arrays • The declaration: int a[10]; – a reference to a[i] is equivalent to the pointer-plus-offset form *(a+i)
  • 8. Conditional statements  if…else • The ARM architecture offers unusually efficient support for conditional expressions when the conditionally executed statement is small • More complex ‘if’ statements: more conventional solution
  • 11. Loops For loops for (i=0; i<10; i++) {a[i] = 0; } • It can be further improved by moving the test to the bottom of the loop
  • 12. Loops(contd) While loops • The standard conceptual arrangement of a ‘while’ loop is as follow • One fewer branch is executed each time the complete ‘while’ structure is encountered
  • 13. Functions and procedures  Program design • Large programs are broken down into components that are small enough be thoroughly tested • How small software component performs its operation should be of no significance to the rest of the program (abstraction)  Program hierarchy • The full program should be designed as a hierarchy of components • Lower-level routines may be shared by higher-level routines, calls may skip levels, and the depth may vary across the hierarchy  Leaf routines • At the lowest level of the hierarchy • Do not call any lower-level routines • Bottom-level routines will be library or system functions
  • 14.
  • 15. Functions and procedures(contd)  Subroutine – A generic term for a routine that is called by a higher-level routine, particularly when viewing a program at the assembly language level  Function – A subroutine which returns a value through its name c = max (a, b);  Procedure – A subroutine which is called to carry out some operation on specified data item(s) printf (“Hello Worldn”);  Argument: an expression passed to a function call  Parameter: a value received by the function • C uses a strict “call by value” semantics.
  • 16. Functions and procedures(contd)  ARM Procedure Call Standard • The ARM Procedure Call Standard (APCS) is employed by the ARM C compiler • It defines particular uses for the ‘general-purpose’ registers • It defines which form of stack is used from the full/empty, ascending/descending choices • It defines the format of a stack-based data structure used for back- tracing when debugging programs • It defines the function argument and result passing mechanism to be used by all externally visible functions and procedures • It supports the ARM shared library mechanism – which means it supports a standard way for shared (re-entrant) code to access static data
  • 17. Functions and procedures(contd)  APCS variants • There are several (16) different variants of the APCS which are used to generate code for a range of different systems, they support: • 32- or 26- bit PCs – Older ARM processors operated in a 26-bit address space – Some later versions continue to support this for backwards compatibility • Implicit or explicit stack-limit checking – The compiler can insert instructions to perform explicit checks for stack overflow – Where memory management hardware is available, an ARM system can allocate memory to the stack in units of a page (no need to insert instructions) • Two way to pass floating-point arguments – Make extensive use – use eight floating-point registers – Make little or no use – use the integer registers and/or on the stack • Re-entrant or non-re-entrant code – Code as re-entrant is position-independent and addresses all data indirectly through the static base register (sb) – This code can be placed in a ROM and can be shared by several processes