CX51 用户手册----MDU_F120伪指令

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

MDU_F120 Compiler Directive

Abbreviation

None.

Arguments

None.

Default

Multiply and Accumulate Unit support is disabled.

µVision

Options — Target — Use On—Chip Arithmetic Unit.

Description

The MDU_F120 directive enables support for the Multiple and Accumulate Unit (MAC0) of the Silicon Labs C8051F12x devices. When this directive is specified the compiler uses the MAC to increase the speed of the following operations:

Operation Implementation
signed int mul ?C?IMUL_F120 routine
unsigned int mul ?C?IMUL_F120 routine
signed long mul ?C?LMUL_F120 routine
unsigned long mul ?C?LMUL_F120 routine
signed long shift left ?C?LSHL_F120 routine
unsigned long shift left ?C?LSHL_F120 routine
signed long shift right ?C?ULSHR_F120 routine
unsigned long shift right ?C?SLSHR_F120 routine

 Note

  • The arithmetic unit does not allow reentrant code and cannot be used in multiple threads or the main and interrupt routines at the same time. You may therefore need to disable the MDU unit with NOMOD_F120.
See Also

NOMDU_F120

Example
C51 SAMPLE.C MDU_F120

#pragma mdu_f120

 Related Knowledgebase Articles



MDU_F120 编译器伪指令

缩写

无。

参数

无。

缺省

乘加单元支持禁止。

µVision

Options — Target — Use On—Chip Arithmetic Unit.

描述

MDU_F120 伪指令使能支持Silicon Labs C8051F12x 器件的乘加单元(MAC0) 。当指定这个伪指令,编译器使用MAC增加下面操作的速度:

操作 实现
有符号整型乘 ?C?IMUL_F120 函数
符号整型乘 ?C?IMUL_F120 函数
有符号长整型乘 ?C?LMUL_F120 函数
符号长整型乘 ?C?LMUL_F120 函数
有符号长整型左移 ?C?LSHL_F120 函数
无符号长整型左移 ?C?LSHL_F120 函数
有符号长整型又移 ?C?ULSHR_F120 函数
符号长整型又移 ?C?SLSHR_F120 函数

 左移

  • 算术单元不允许重入代码,不能同时用在多线程或主程序以及中断程序中。因此用户需要用NOMOD_F120禁止 MDU 单元。
参考

NOMDU_F120

示例
C51 SAMPLE.C MDU_F120

#pragma mdu_f120





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值