64 bit data type for ARM register











up vote
-1
down vote

favorite












I am using RVDS60 64 bit compiler to compile my test code for ARM A76 core. While executing the following statement, I can observe 64 bit data getting updated in X0 register in my debugger window:



  MRS X0, S3_6_c15_c1_1 ; 
RET
ENDP


But when it returns from the assembly language to my C code, the data in the register is only having the lower 32 bit and upper 32 bit is getting chopped. I am using 'volatile unsigned long long int' as the data type.



   volatile unsigned long long int ildata0, ildata1, ildata2,data0,data1;
unsigned int entry = 0;

data0 = tlb_l1_ram_data_register_0A0(entry);


Data0 is always reading 0 though in X0 I can see 64 bit data with upper 32 bits holding the data. What might be the reason ?










share|improve this question






















  • Are you using an ARM Cortex-A? If so, add the cortex-a tag.
    – Fiddling Bits
    Nov 9 at 19:00












  • I found -mcpu=cortex-a53 in the compile log
    – user3565150
    Nov 9 at 19:24






  • 1




    Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
    – Peter Cordes
    Nov 10 at 1:43










  • Thanks, declaration of function resolves the issue
    – user3565150
    Nov 11 at 20:09















up vote
-1
down vote

favorite












I am using RVDS60 64 bit compiler to compile my test code for ARM A76 core. While executing the following statement, I can observe 64 bit data getting updated in X0 register in my debugger window:



  MRS X0, S3_6_c15_c1_1 ; 
RET
ENDP


But when it returns from the assembly language to my C code, the data in the register is only having the lower 32 bit and upper 32 bit is getting chopped. I am using 'volatile unsigned long long int' as the data type.



   volatile unsigned long long int ildata0, ildata1, ildata2,data0,data1;
unsigned int entry = 0;

data0 = tlb_l1_ram_data_register_0A0(entry);


Data0 is always reading 0 though in X0 I can see 64 bit data with upper 32 bits holding the data. What might be the reason ?










share|improve this question






















  • Are you using an ARM Cortex-A? If so, add the cortex-a tag.
    – Fiddling Bits
    Nov 9 at 19:00












  • I found -mcpu=cortex-a53 in the compile log
    – user3565150
    Nov 9 at 19:24






  • 1




    Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
    – Peter Cordes
    Nov 10 at 1:43










  • Thanks, declaration of function resolves the issue
    – user3565150
    Nov 11 at 20:09













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am using RVDS60 64 bit compiler to compile my test code for ARM A76 core. While executing the following statement, I can observe 64 bit data getting updated in X0 register in my debugger window:



  MRS X0, S3_6_c15_c1_1 ; 
RET
ENDP


But when it returns from the assembly language to my C code, the data in the register is only having the lower 32 bit and upper 32 bit is getting chopped. I am using 'volatile unsigned long long int' as the data type.



   volatile unsigned long long int ildata0, ildata1, ildata2,data0,data1;
unsigned int entry = 0;

data0 = tlb_l1_ram_data_register_0A0(entry);


Data0 is always reading 0 though in X0 I can see 64 bit data with upper 32 bits holding the data. What might be the reason ?










share|improve this question













I am using RVDS60 64 bit compiler to compile my test code for ARM A76 core. While executing the following statement, I can observe 64 bit data getting updated in X0 register in my debugger window:



  MRS X0, S3_6_c15_c1_1 ; 
RET
ENDP


But when it returns from the assembly language to my C code, the data in the register is only having the lower 32 bit and upper 32 bit is getting chopped. I am using 'volatile unsigned long long int' as the data type.



   volatile unsigned long long int ildata0, ildata1, ildata2,data0,data1;
unsigned int entry = 0;

data0 = tlb_l1_ram_data_register_0A0(entry);


Data0 is always reading 0 though in X0 I can see 64 bit data with upper 32 bits holding the data. What might be the reason ?







assembly arm disassembly






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 18:56









user3565150

3721629




3721629












  • Are you using an ARM Cortex-A? If so, add the cortex-a tag.
    – Fiddling Bits
    Nov 9 at 19:00












  • I found -mcpu=cortex-a53 in the compile log
    – user3565150
    Nov 9 at 19:24






  • 1




    Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
    – Peter Cordes
    Nov 10 at 1:43










  • Thanks, declaration of function resolves the issue
    – user3565150
    Nov 11 at 20:09


















  • Are you using an ARM Cortex-A? If so, add the cortex-a tag.
    – Fiddling Bits
    Nov 9 at 19:00












  • I found -mcpu=cortex-a53 in the compile log
    – user3565150
    Nov 9 at 19:24






  • 1




    Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
    – Peter Cordes
    Nov 10 at 1:43










  • Thanks, declaration of function resolves the issue
    – user3565150
    Nov 11 at 20:09
















Are you using an ARM Cortex-A? If so, add the cortex-a tag.
– Fiddling Bits
Nov 9 at 19:00






Are you using an ARM Cortex-A? If so, add the cortex-a tag.
– Fiddling Bits
Nov 9 at 19:00














I found -mcpu=cortex-a53 in the compile log
– user3565150
Nov 9 at 19:24




I found -mcpu=cortex-a53 in the compile log
– user3565150
Nov 9 at 19:24




1




1




Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
– Peter Cordes
Nov 10 at 1:43




Did you declare tlb_l1_ram_data_register_0A0 as a function that returns unsigned long long? What do you see when you single-step the asm from your ret back into compiler-generated code? (GDB stepi, and use layout asm / layout reg for asm debugging of the compiler output.)
– Peter Cordes
Nov 10 at 1:43












Thanks, declaration of function resolves the issue
– user3565150
Nov 11 at 20:09




Thanks, declaration of function resolves the issue
– user3565150
Nov 11 at 20:09

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231782%2f64-bit-data-type-for-arm-register%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231782%2f64-bit-data-type-for-arm-register%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

how to define a CAPL function taking a sysvar argument

How do I alter this code to allow abstract classes or interfaces to work over identical auto generated...

Krisenintervention