This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR6989:指令所需的时钟周期为@RM 作为目的

Guru**** 2782475 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/957241/msp430fr6989-clock-cycles-needed-for-instruction-with-rm-as-destination

器件型号:MSP430FR6989

您好!  

我遇到了指令  

MOV.B   R13 、@R14  
我们想知道它需要多少个时钟周期。 因为 这里(  p145)和 这里都没有  给出。 在这两个文档中、都不会给出在目的中使用@RM 的指令需要多少个时钟周期。 两人都说这实际上是不可能的。 但我具有以下代码的反汇编:  
typedef 结构{
uint8_t LSB;
uint8_t MSB;
}structure_word;

union{
structure_word word_struct;
uint16_t word;
}byte_TO_word;

int conversion _union (uint8_t MSB、
uint8_t LSB){
byte_To_word.word_struct.msb = MSB;
byte_To_word.word_struct.LSB = LSB;
返回 byte_To_word.word;
}

如下所示:  

转换联合:
MOV.W #byte_TO_WORD、R14
MOV.B R12、1 (R14)
MOV.B R13、@R14
MOV.W &byte_TO_WORD、R12
可重置

其中有两件事情看起来不正确。 第一行(推入常量、我认为这不是一个地址?)、第二行是目标位置的@RM。  

我认为这可能是因为它是 Intel 语法(我使用  godbolt 编译器资源管理器)、但代码在最轻微的情况下是没有意义的。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    显示该代码的任何内容似乎都隐藏了0索引。 查看十六进制数据、您应该会发现"mov.b R13、@r14"有两个字。 第二个为零。 换句话说、它实际上是"mov.b R13、0 (r14)"

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我想很多。 谢谢。