473,774 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1886
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
14158
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 uninitialized value in concatenation (.) at register.pl line 38, <STDIN> line 10." The PERL code is as follows:
8
1724
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
2761
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
6437
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 be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
3
3104
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 the items between list boxes (the listbox controls are server side ones with runat=server set on them, the buttons are basic html button i dont want to post back each time someone clicks on add or remove... that wastes time and bandwidth) well the...
6
2041
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. The Factories all have a base class as well for the objects to point back to. So I have
10
1911
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 bellow . Lets say I have not included stdlib.h in my program still I am using malloc so compiler will throw warring because with out prototype
1
4366
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 these new sets of codes have overwhelmed me a bit. Here's the new code: CREATE TABLE `users` ( `ID` int(11) NOT NULL auto_increment, `Username` varchar(255) NOT NULL, `Password` varchar(255) NOT NULL, `Temp_pass` varchar(55)...
16
1836
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 accesses to the members are byte-wide, or is the compiler free to read or read-modify-write in any data width it chooses? Is slapping a volatile on each member of the struct definition any different? better? worse?
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10046
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9915
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4014
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.