473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

question on register data type

Hi all,
Where we use Register data type varible in Device drivers?
Before the .obj or .exe Generation where we use register data type
Declaration.
Jan 4 '08 #1
4 1868
sr******@gmail.com wrote:
Hi all,
Where we use Register data type varible in Device drivers?
Before the .obj or .exe Generation where we use register data type
Declaration.
In general, don't bother, let the compiler do the register assignment
for you.

--
Ian Collins.
Jan 4 '08 #2
On Jan 4, 10:52*am, "srbli...@gmail.com" <srbli...@gmail.comwrote:
*Where we use Register data type varible
I don't think register (note all lower case) is a data type.
It's a modifier I think.

The usual answer on comp.lang.c is that register is a suggestion
to the compiler which it is at liberty to ignore. With modern
compilers register is unnecessary as the compiler does a better job
than a human. [this applies 99% occasionally judicious use of
register may beat the compiler. But you'd probably have to know
your compiler really well and you *must* measure your programs
performance with actual data]
in Device drivers?
ah. Well some embedded compilers may be less good. But the
same advice applies. Examine the assembler output with and
without register. Measure the performance with real data.
* *Before the .obj or .exe Generation where we use register data type
* *Declaration.
what? register to the best of my knowlege is a source level
thingy. I don't see what it has to do with obj and .exe files.
Anway obj and exe are compiler specific you need a compiler
specific or embedded group for these sort of details.
--
Nick Keighley
Jan 4 '08 #3
"sr******@gmail.com" <sr******@gmail.comwrote:
Where we use Register data type varible in Device drivers?
- It's not Register, it's register. C is case-sensitive.
- It's not a data type, it's a storage class.
- These days, we don't use it anywhere. Your optimiser will know better
than you what is the most efficient use of registers.

Richard
Jan 4 '08 #4
sr******@gmail.com wrote:
Hi all,
Where we use Register data type varible in Device drivers?
Before the .obj or .exe Generation where we use register data type
Declaration.
Just forget about register and let your compiler's optimiser do it's
job.

Jan 5 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of...
8
by: Sue | last post by:
In this code why is it that when I press the SUBMIT button the focus only goes back to the Numeric field. What do I need to do to correct this problem? Sue <html>
9
by: Tim Rentsch | last post by:
I have a question about what ANSI C allows/requires in a particular context related to 'volatile'. Consider the following: volatile int x; int x_remainder_arg( int y ){ return x % y; }
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
3
by: Brian Henry | last post by:
I have two list boxes on my form... lstCanSend and lstRecipients... well then there are two buttons add and remove between them (your basic select and pick listing) which uses java script to move...
6
by: AzizMandar | last post by:
There is probably a better way to do this and if so I'm just as happy to see that way. I have a program where I have factories that each create various objects abstracted from a base class. ...
10
by: somenath | last post by:
Hi All, I have one question regarding return value cast of malloc. I learned that we should not cast the return value of malloc because it is bug hider. But my question is as mentioned...
1
George Lft
by: George Lft | last post by:
ok, first of all, i built my register page using dreamweaver tool which the codes haven been out of control. Now i'm thinking that turning over everything - by using this another set of codes. And...
16
by: Ark Khasin | last post by:
I have a memory-mapped peripheral with a mapping like, say, struct T {uint8_t read, write, status, forkicks;}; If I slap a volatile on an object of type struct T, does it guarantee that all...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.