When you just type "rms calculation" into the "Keyword search"-field at top uf this page you will be presented with quite a number of abstracts and solutions worth reading.
Note some PSOC 1s, M8C core, in your case, have a MAC you can use to improve
computation time and save code space. Some parts have 2 MACs.
http://www.cypress.com/?rID=2814 AN2032 - PSoC® 1 Fast Unsigned Multiplication Algorithms