add AMD/CMD support

方法来自：http://www.zhihu.com/question/23321329